You need to take an organized trip in St Petersburg but most of the other ports of call are capital cities and you can walk or take a tour bus around them without having to do a trip. This is certainly the case for Oslo, Stockholm, Copenhagen and Tallinn.Most are within walking distance of where the ship berths although it is worth taking the shuttle bus in Tallinn and Stockholm in particular.
Helsinki has a tram from the waterfront that makes a complete circuit around the city and it's very cheap. You can get a map with the places of interest from the Information Bureau also located on the main waterfront.
Stockholm has a tourist bus that leaves from the Information Bureau with a commentary in English via headphones, good but not cheap.
Tallinn is an absolute joy and small enough to just walk around.