Hi Anne,
On our last cruise to the Southern Caribbean, we were able to take a tour the day we got off the ship, also had a late flight. We were on a Princess ship and were able to check in all the luggage at the pier, get our boarding passes, etc. Then we were on our way with a nice tour that ended at the airport, much better than hanging out at the San Juan airport, still not enough seats

Depending on how late your flight was, you could also spend the day at a hotel and use their facalities, beach, pool, etc. Unfortunately, we didn't have enough time for that, but that sure sounds like a great way to end a cruise.
Once you get on board, you should be able to find about these tours, we didn't know anything about it either til we were already cruising and they did provide all this information. We also had purchased the transfers back to the airport, which they did credit us, since we didn't end up needed them.
Have a great cruise
Donnassei