If you're Hamptons-less this summer and looking to take a day trip to the beach, there are a couple of easy public-transportation options. Last year I mostly did the A train to Rockaway Beach: it's free (except for the subway ride), it takes about an hour from West 4th Street, the beach is wide and reasonably clean and surprisingly uncrowded. I've also tried New Jersey's Sandy Hook, which involves a ferry and a bus and a beach that doesn't quite seem like it's worth the extra effort and expense.
But when you're going solo, I've found that Long Beach is the better, less lonely, option... so that's what I did last Saturday. It costs more than Rockaway—$18 for a round-trip train ticket and admission to the beach—and there's the good news/bad news of having to take the LIRR instead of the subway: the trains are fairly comfy and it's easy to nap on the way home; you have to stick to a schedule, and deal with Penn Station at both ends.
There are trains leaving the city every hour on the :48, and the ride takes 55 minutes... unless you get the 10:23 express, which is totally the way to go, and puts you on the beach by 11:15 or so, when it look likes the picture at top. The beach itself is large and pretty, the sand definitely nicer than Rockaway, there are adequate bathrooms and snack bars and such, and though it definitely gets pretty packed by the afternoon (see below), it's a young, relatively unobnoxious crowd, so it feels more festive than oppressive.
Long Beach is on Long Island. Make sure to buy the "beach package" in Penn Station, and don't get your tickets on the train, as there is some ridiculous surcharge for doing so. The beach is a short walk from the Long Beach station, and there's a deli on the way to get supplies, if needed.