Welcome aboard, Alisha! You must be sailing on the Fantasy, which will certainly be a treat in itself, but making stops in the Eastern Caribbean makes that cruise all the more magical!
I'd highly recommend taking one of Disney's Port Adventures, rather than hassling with taxis on your own, as Disney plans every detail and makes adventuring out very easy and worth every penny. The
Magens Bay Beach adventure is perfect for all ages and relatively inexpensive, so you might consider that. With Disney's tours, you needn't worry about getting back to the ship on time, because if there is some sort of unexpected delay, Disney is notified and will hold the ship for their Disney Port Adventures groups to return. Peace of mind at it's best, I assure you!
However, in St. Thomas you could check out Morningstar Beach on your own, just a short taxi ride from the port. It's near the Marriott, though you don't need to be a hotel guest to use this area. Beach chairs and umbrellas are available for a fee and there are a few food spots around there too.
St. John is a bit trickier, as you'll need to take a taxi to get to the ferry from St. Thomas over to St. John. Once you reach St. John, you can take another taxi to Trunk Bay, which is gorgeous! Just watch your time, though because the ferry can have a wait, so keep that in mind when determining when to head back.
Also, you might consider how comfortable you feel hopping a taxi on your own with your two-year old without a car seat. Disney's transportation considers the ages when they offer adventures, so I always feel better about my kids riding in something Disney has arranged.
I hope that information helps, Alisha! Let me know if you have any other questions as you continue to plan! I'm happy to help!