I did this cruise two years ago, it was wonderful. The best way to see that various ports of call are to walk. There are one or two that needs transport then the ships tour guides are the best value. Have a lovely holida.
For Flam the absolute must trip is a journey on the Flam railway that takes about an hour each way and is through the most spectacular scenery you can imagine. It rises from sea level to over a 1000 feet and can be booked yourself from the station which is right next to where the cruise ships dock. For more info look on the web at the Flamsbana site. In Beregen best trip is to walk or take the shuttle bus to the funicular railway which takes you up to the top of the mountain (2 minute journey)that overlooks Bergen. We then walkwed down and through Bryggen and the fish market - the most scenic part of Bergen. Again simply find the Norway Tourist site and it gives chapter and verse what to do.
Cruised to the Fjords in May this year. The places visited are no more than villages with the exception of Bergen which is quite a sizeable city but anytime I've been there it has rained so hard couldn't get off the ship. The scenery is quite stunning, but each place looks like the other. There is really not a lot to do ashore, the FFlam railway is OK but expensive. This is not the place to shop (if you can find any). Hope the weather is kind to you. Good luc.