We're planning on leaving early from Rome to Pompeii and spending a couple of ours there. Then proceeding to Sorrento for the rest of the day. And then returning to Rome. You know our schedule, the question is; do we buy the tickets in advance or do we buy them as we go along? And how difficult to go on, are the last trains going back to Rome from Sorrento?
Miguel,
That's going to be a VERY LONG day trip from Rome, and probably very tiring. Travel to Pompeii is certainly possible, but spending the rest of the day in Sorrento after that will make the trip somewhat more challenging.
Keep in mind that you'll be using the "regular" trains to Naples, and then transferring to the Circumvesuviana. You'll have to research the times carefully to ensure you don't miss the last train back to Naples or Rome.
You can check the rail schedules for the regular trains at www.trenitalia.com and the Circumvesuviana at www.vesuviana.it/web/en.
Cheers!