Allan Weisbecker's wonderful book, "In Search of Captain Zero", details his sometimes dicey beach camping adventures in Mexico and beyond - besides being a great read, it may give you pause to think about traveling without a car.
Down to business! Start with this great Mexican camping page for some basic camping common sense tips - the most valuable piece of advice is to ask for permission before camping on private land. The author, Jeffrey R. Bacon, says, "Whenever possible, obtain permission to camp, and practice low-impact camping techniques and safe fire handling practices. Pastors, cowboys, restaurant owners, local travelers, and even squatters have given me and my traveling companions helpful advice and accommodating assurance when we've asked for permission to camp."
Pitching your tent for free is great, but holds pitfalls: if you're on private land without permission, you may be rousted in the middle of the night; if you're hanging your hat on a deserted beach, you may be fair game for predators. Let's assume you're traveling in your own vehicle and would prefer to stay in a safe campground (for which you will fork over some pesos, natch) - check this guide to some (sometimes spendy) campgrounds. In fact, some are virtually resorts. The best thing about this guide are the detailed area descriptions accompanying the campground info - even if you have no wish to stay in the camp ground, the descriptions are good guides.
This link is also meant for those traveling by RV or car - the site features a great clickable map.
Safety: read up on the U.S. Department of State's tips for traveling safely in Mexico.
Driving in Mexico: read!. Learn about insurance, Mexican border crossings and the interesting rules of the Mexican road. Don't forget to buy a map! Lastly, consider buying Mike Church's "Traveler's Guide to Mexican Camping" and give it a good going-over before you leave.
Mountains, beaches, deserts - Mexico is camping heaven. Enjoy!