I've been to both islands a half dozen times on a cruise ship, and I dive every time. The past several times we (my group) dived with Dive St Martin (in the link in the other post, above) and they have always been solid. As an added bonus, they are a short walk down the street from the cruise ship pier. The past couple times we've stopped at St Maarten, we've walked to the shop, did a two tank dive trip, had lunch, hopped the local bus out to Maho Beach, watched the planes land for a while, hopped the bus back into town, and then back to our ship in plenty of time before departure.
St Thomas... has been difficult. We're doing our next Caribbean cruise at the end of January and I was just this evening checking out options for St Thomas. To complicate matters, St Thomas has two cruise ports: Havensight and Crown Bay. Most dive ops will arrange some kind of transportation, but you'll find that doing some of the planning yourself will help a lot.
Our first few trips to St Thomas (a while ago... between 10 and 20 yrs), we dove with Blue Island Divers, and they completely spoiled us: the dive boat was small and they picked us up -- literally -- right next to the cruise ship (dropped us off there too). We were docked at Havensight, and the best dive sites -- along the southern edge of the island -- were right there. We had some very good dives there.
Unfortunately BI Divers is no more. On another trip, we went out with Admiralty Dive Center. They brought us to their shop, which is near the other cruise ship pier (at Crown Bay). Their shop is close to the best sites, along the south shore. (Our ship -- a Royal Caribbean -- will be docking at Crown Bay in January, so I'm looking to go out with Admiralty then. I just emailed them this evening.)
Our most recent stop at St Thomas... we went out with JJ Divers. They were fairly new at the time, but I recently checked out their website and it seems they offer the same thing we got. Which is why I won't go with them again. They were very enthusiastic, but their boat is docked at the east end of the island and they seem to stick to dive sites in that area, which are just not at all interesting. There have been very few times in my life that I've been bored while diving... but my dives with JJ Divers was certainly one of them. It seems they expect to cater to new and/or inexperienced divers, which just was not a fit for our group. After our dives, the crew was very excited: "WeRen'T tHoSe GREAT diVeS??!? WaSn'T tHaT aWeSoMe?!?" No, sorry. No. It just wasn't.
So definitely at St Thomas I suggest you find a shop (like Admiralty) that will get you to the sites on the southern shore.
Amber Cove: I've never been.
San Juan: been there many times, and have never thought about diving there. Unfortunately, the diving in Puerto Rico is either at the islands off the eastern end (Culebra, Vieques), the western end (Rincon... we stayed and dived there a few days), our the south-west (Parguera). Driving San Juan to Rincon is pretty easy, but takes about two hours... not enough time to get there, dive, and get back to your ship. My advice would be to skip the diving in San Juan, spend the day in the town, checking out the amazing history. (We usually take cruises that depart San Juan and head to the islands further south, so we have a couple days before and/or after the cruise to hang out in Puerto Rico.)
Hope this helps... let me know if you have more questions, need more detail.