In short
Sorrento sits on a fifty-metre cliff above the sea, facing Vesuvius. It is the logical base for the gulf: Pompeii thirty minutes by train, Capri twenty minutes by boat, the Amalfi coast by the southern road.
The town itself is seen in half a day. What you come for is around it, not in it.
What it really costs
Accommodation costs more than in Naples for a town ten times smaller, because everyone makes it their base. Sleeping at Vico Equense or Meta, two stops earlier, costs noticeably less.
The Circumvesuviana train links Naples, Pompeii and Sorrento for a few euros. It is old and crowded, but it is the only cheap way to move.
What nobody tells you
There is no sandy beach. The coast is rocky and access to the sea is by paid wooden platforms clamped to the cliff, where you hire a lounger. People who come to swim are often disappointed.
The Amalfi coast road is narrow, winding and gridlocked from April to October. The boat to Positano and Amalfi saves two hours of traffic for a comparable price.
In high season the queues for the Capri boat start an hour before departure. The first sailing of the morning changes the day entirely.