Puerto Rico is small enough that almost anywhere on the main island is a day trip from San Juan. El Yunque (the only tropical rainforest in the US National Forest system) is 45 minutes east — the most popular excursion. Fajardo, an hour east, is the launching point for the offshore islands of Vieques and Culebra and for the bioluminescent bay at Laguna Grande. Ponce, the second city, is a long day-trip on the south coast and worth it for the Museo de Arte de Ponce. Arecibo, on the north coast, used to host the world's largest radio telescope (which collapsed in 2020 but the site is still open as a memorial visitor centre).
Vieques and Culebra, the two inhabited offshore islands, deserve overnight stays rather than day trips — but if you have only a day and want a perfect Caribbean beach, the ferry-and-public-van combination from Fajardo to Culebra's Flamenco Beach is feasible.