Catching a ferry between Naples and Sorrento is often a safer and more enjoyable alternative to the Naples - Sorrento (Circumvesuvian Train). There are a couple of options with regard to which ferry you catch as well.
Alilauro Hydrofoil
The Alilauro Hydrofoil offers the quickest route between Sorrento and Naples, travelling to/from Naples' Moro Beverello pier. The trip lasts about 40minutes, and costs €11 one-way (return fares are double the single fare). The boat itself is very fast, and as a result, passengers aren't permitted to stand on-deck. You can still see plenty of scenery from your seat, but if you would rather have the opportunity to take photographs, I would recommoend the Metro del Mare. Full details are available on the Alilauro website.
Metro del Mare
The Metro del Mare network operates along the length of the Amalfi Coast, and as a result, there are plenty of different services that operate between Naples and Sorrento. For this route, you need to catch the MM1, MM2, MM3 or MM7. The quickest route between Naples and Sorrento is the MM3 ferry, as it only stops at one other port between the cities. A single ticket costs from €6.50. Full details can be found on the Metro del Mare website.