Pompei and Ercolano are two of the most famous Italian touristic sights. As you might know, the cities were destroyed and buried by ash by the Vesuvio eruption during the Roman Empire and stayed untouched until they were discovered and restored in the XVIII century. These ruins, as big as a city, offer a great overview over roman life, with wonderful mosaics.
It seems it's possible to visit them by train with the Circumvesuviana, a suburban train with few lines going up or around the volcano Vesuvio.
Pompei is half-way to Sorrento. By train, from Naples to the coast of Sorrento is just one hour! In the sunny days the view on the Gulf of Naples and Vesuvio is amazing!