When in Russia it's best to do the ship excursion as it's easier to deal with visa / immigration bits this way.
Have recently been in the baltic with Princess cruises. If you like walking I would suggest you do the walking tour of Copenhagen. We found it very informative with an excellent local tour guide. Copenhagen itself is a very nice city to visit.
We did a Baltic cruise 3 years ago. In every port except St Petersburg we 'did our own thing'. In Oslo, Copenhagen and Stockholm you can take a canal trip at reasonable cost and as the ships usually berth near the city centre it's not dificult to find these trips. They will also be much cheaper than the ones the cruise ship will offer. The old town of Tallin is beautiful-well worth just wandering around it on your own. In St Petersburg you really need to book the trips organised by the cruise ship as otherwise you will need to apply for a visa months in advance. The ship also docks a long way from the city centre. Enjoy your cruise!