The shape below assumes a Naples base and one run along the coast, which is why the ruins come first and the longest coastal hop comes last.
Day 1: Pompeii
Pompeii is a walking site, cobbled and uneven, with almost no shade, and summer temperatures run 32 to 35°C, so the hours before noon are worth more than the hours after two. Bring good footwear, a hat and sunscreen, and carry water.
Leave bags at Pompei Scavi-Villa dei Misteri for €1.50 if the coast comes next, or use the free storage at the ruins and collect by 19:20. The Circumvesuviana ticket to Pompei Scavi costs €1.80, bought downstairs at Napoli Centrale, and it is the cheapest way in. Inside, let the Forum set the geography: the Temple of Apollo sits to its north, the Basilica to its west, and the Forum Baths just north of the square.

The site rewards a loop rather than a checklist. The Theatre, built into the hollow of a hill, seats 5,000. The Amphitheatre at the far eastern corner was completed in 80 BC, measures 135 by 104 m and held about 20,000 people. Between them are the houses: the Vettii with its frescoes, the Faun with the statue that gave it its name, and the Tragic Poet with the chained dog mosaic and the words Cave Canem.
A guided walk of the ruins runs about two hours and is built to cover one temple, one market, one shop, one villa, one set of baths, one theater and the Forum, because not every building opens on a given day. What you add afterward is the Forum Granary with its storage jars and plaster casts, the Garden of the Fugitives, and the Villa dei Misteri beyond the old walls.
On the way out, the stands between the station and the entrance press orange and lemon juice for about €3 a glass, and in that heat it is money well spent. The restaurant north of the Forum has toilets, which is worth knowing on a site this size.
Day 2: Sorrento and Positano
Day 2 heads for the coast and opens at a limoncello factory, where the product is made in front of you. Sorrento gets an hour after that, and an hour is the right allowance for a first look at the town rather than a full circuit of it.
Positano comes next and divides people: some walk the streets, others sit with a drink by the sea. The church of Santa Maria Assunta is the sight to see here, and the beach is the alternative if the afternoon turns hot.

Getting between the three towns is where this day can go wrong. The City Sightseeing bus runs hourly from April to October, 40 minutes from Sorrento to Positano and 50 minutes more to Amalfi, at €10 for one stop and €15 for two. The hydrofoil between Sorrento and Positano runs eight times a day and skips the traffic altogether.
If you want a shorter start on Day 3, sleep in Sorrento; if you would rather wake up inside the village, stay in Positano and accept a bus before breakfast. Whichever you pick, the hour to cut when the day runs late is the one in Sorrento.
Day 3: Amalfi, Ravello and the Way Back
Day 3 keeps to the last stretch of coast and gives the morning to Amalfi. The Duomo and its cloister, the Chiostro del Paradiso, are the pair to see first; after that the town is a place for gelato by the shore rather than another church.
Ravello is a bus ride from Amalfi, every half hour at €5 each way, and it holds Villa Cimbrone and Villa Rufolo. That makes the side trip a separate decision rather than part of the town visit. Atrani holds two small churches, San Salvatore del Birecto and Santa Maria Maddalena, for anyone who wants a village on foot.

If you would rather walk than ride, the Sentiero degli Dei runs 7 km from Bomerano to Nocelle above Positano. It is a moderately challenging path with a lot of steps, and it trades the villages for terraces and the sea below.
The return leg is where the plan pays off. The ferry from Amalfi to Sorrento takes you back to the rail line, and from there the train does the rest.