While summer is a popular time to visit Rome, it can also be very hot. There are several good beaches in the Lazio region that can be reached by public transportation from Rome for those who want to escape the heat and take a day trip out of the city.
Ostia Lido Beach
While it might not be as glamorous as other Italian beaches, Ostia Lido is the closest to Rome. There are some good private sandy beaches available for day use as well as a few public beach areas. The beach at Ostia is known for its dark sand and the water is clean enough for swimming. For less crowded and more comfortable beach areas, you can pay a day fee for private beach entrance and rent a beach chair, umbrella, and towel. Private beaches usually have changing rooms, bathrooms, and a bar and sometimes additional amenities so if you're planning to spend much time on the beach it's usually worth paying.
To get to Ostia Lido, take the Rome Metro Line B to the Piramide stop, then take the Ostia-Lido train in the direction of Cristoforo Colombo (using the same ticket for both). Get off at the Ostia Lido centro stop, about half an hour ride or continue to the next stop, Ostia Stella Polare.
You could also stop off to see the ancient Roman ruins at Ostia Antica, the ancient port of Rome, on the way (Ostia Antica is two stops before Ostia Lido centro). If you're flying out of Fiumicino airport, staying in Ostia Lido makes a good alternative to staying in an airport hotel.
Santa Marinella Beach
Santa Marinella is north of Rome, about an hour by regional train from Termini Station, Rome's main railway station. There are 2 or 3 trains per hour most of the day and it's about a five-minute walk from the station to the beach.
Santa Marinella has nice sandy beaches, both with free access and private, and clear water for swimming. Like most Italian beaches, they are very crowded on weekends. In the small town of Santa Marinella you'll find bars, shops, and good seafood restaurants.
In the days of ancient Rome, Santa Marinella was a Roman bathing resort and going back even further in time the Etruscan ruins of Pyrgi are about 8 miles southeast in Santa Severa, another beach resort town. To reach Santa Severa, change trains in Civitavecchia.
If you want to visit a nice town with really good beaches, Sperlonga is the top pick for a beach day from Rome although it's a little farther than the first two. Sperlonga beach is one of Italy's blue flag beaches which means the sand and water are clean and the beach is environmentally friendly. Most of the beach areas are private so you'll pay a fee for use. Sperlonga itself is a picturesque town with narrow streets rising up the hill from the sea. In town there are shops, cafes, and restaurants.
Getting to Sperlonga takes about 1 1/2 hours. Take a regional train from Rome's Termini station to the Fondi-Sperlonga station (a little over an hour), then take a bus from outside the station.
Sperlonga has been a popular seaside destination since Roman times. Emperor Tiberius had a villa south of the town that you can visit along with the Grotto of Tiberius and archeological museum. Gaeta is another nice town with good beaches in the area.
More Excursions from Rome
If you're using Rome as a base, there are many interesting places to go on day trips. Here are top choices for Rome Day Trips, from nearby places like Vatican City and the ancient Appain Way to the hill towns of Orvieto and Frascati, which also make good summer getaways.