Before reading B. Lahey's old threads posted here I was thinking the largest gun you can stand for the beach, after reading them, I am thinking that even more strongly.
Smaller guns, especially the micro-9's, can be temperamental. If anything isn't quite right, they may not function properly. Probably any service sized pistol from any of the major manufacturers will work decently. Of course, those are too big for easy CCW in any circumstances, at the beach, forget it.
As already mentioned, the smaller Eastern Bloc service pistols may work. A CZ 82, Mak, or the Polish P-64 should be barely small enough for beach carry (the P 64 is probably the smallest of the bunch), the 9x18mm round isn't too bad in power, and they should be incredibly reliable.
The Bersa Thunder that was mentioned is probably a good choice. I had a Bersa .380 and it was a terrific gun (reliable, fun, accurate).
Glock used to do those torture tests when they first came out to prove that a polymer gun could be durable. They are ugly (or functional depending upon how you see it), so some wear from beach use won't be a big deal.
SIGs look functional (so some exterior scratching doesn't matter), they are reliable, and accurate. A 239, 250SC or 290 may be a good option. I love my 290. I'm sold on the 250 and I'm currently in the market for one in either .40 or .45 (they are quite inexpensive, and the modular aspect is nice).
If you want to go reliable but inexpensive in case it gets messed up at the beach, I've had good luck with my 2nd generation Taurus PT140 Millennium Pro. Of course, they do have a built in lock.
Even as a revolver guy, I'm thinking a revolver may not be a good candidate. Sandy conditions seem like they don't mix well with a revolver, I can definitely see it binding when a few grains of sand get where they don't belong.
Other than function, I wouldn't worry too much though. Sand won't ruin any quality handgun unless you shoot a lot of rounds with it full of sand (and even then it might be fine). Even if you fell in the ocean with it, I'm sure if you cleaned it shortly after coming home you'd be fine. The salt in the air from the salt water can be a problem, but that just means you need to wipe it down more often (maybe everyday), and a polymer frame and/or stainless may be a good option.