I've not been to this beach in the summer, but Ostia has nice beaches (probably not like in Florida or the Caribbean.) You can easily reach Ostia by the regional train from the San Paolo station in Rome. We have taken the train twice to Ostia Antica, the wonderful ruins that are better than Pompeii, IMHO. They don't have the backstory of the volcanic eruption but are wonderful to walk through. You could visit the ruins in the morning, hop back on the same train and get off in Ostia to enjoy the afternoon at the beach.
I stayed in Ostia in December at the Fly Deco Hotel, so we saw the beaches, but December isn't beach weather in Europe.
I've seen most of the sites in Rome, having been there several times. Get Rick Steves' guide book from the library to access his itinerary recommendations, although I think they are also on this site.
Here is what I would try to do (assuming you love ancient history)
A day at the Vatican (we did it ourselves with the help of Rick's free audio apps.
A day at Coloseum and Forum area
A day at Galleria Borghese and the Etruscan Museum, Spanish Steps, Trevi Fountain, etc.
A Day in the countryside to spend half a day at the Catacombs, Appian Way, Aqueducts and the other at the National Museum of Rome and the Baths of Diocletian near Termini. This could be two days.
Half Day in Ostia Antica and then the beaches of Ostia
Travel to Naples or Venice. Not an expert on Venice.
In Naples, visit Pompeii
I wasn't overly impressed with the Naples Archaeology museum (maybe I've seen too many wonderful ancient objects.) A tour of Naples, maybe?
Keep in mind that it will be hot and crowded with long lines, so perhaps you need to add another day in Rome to see the above.