Map from Google - Puerto_Rico

The climate of Puerto Rico is tropical, hot all year round, with a hotter and muggy season from May to October, and a relatively cool season from December to March.
Here are the average temperatures of the capital San Juan, located on the north coast.
Average temperatures - San Juan
San JuanJanFebMarAprMayJunJulAugSepOctNovDec
Min (°C)222223242525262625252423
Max (°C)282929303132323232313029
Min (°F)727273757777797977777573
Max (°F)828484868890909090888684

On the south coast, in winter the temperature is slightly higher, because the prevailing winds, the northeast trade winds, come from the interior; for example, in Ponce the maximum temperature in January and February is 30 °C (86 °F).
At higher altitudes, the temperature is slightly lower: for example, in Adjuntas, at 500 metres (1,600 feet) above sea level, highs range from 25 °C (77 °F) in winter, to 29 °C (77 to 84 °F) in summer, while on Cerro Maravilla, the fourth highest peak on the island, at 1,200 metres (3,900 feet), highs range from 20 °C (68 °F) in winter, to 23 °C (73 °F) in summer.
Here are the average temperatures of Cerro Maravilla.
Average temperatures - Cerro Maravilla
Cerro MaravillaJanFebMarAprMayJunJulAugSepOctNovDec
Min (°C)141313141516171716161514
Max (°C)202021212123232323232221
Min (°F)575555575961636361615957
Max (°F)686870707073737373737270

Every now and then, from December to March, the archipelago can be affected by cool winds from the United States, which can lower the temperature by a few degrees, although in a less noticeable way than in Cuba and Yucatan (Mexico), which are closer to the American continent; however, in these cases the temperature can drop below 10 °C (50 °F) in inland hilly areas, and around freezing in mountainous areas.

As regards the rains, in Puerto Rico there is a rainy season from April to November, with a first rainy peak in May, a relative decrease in June and July, and a second stronger peak from August In October.
The north-east trade winds, which blow all year round, but especially in the cool season, starting from November, discharge moisture, which has been picked up in the sea, in the form of rain, especially on the northern side, which therefore is rainier than the southern side. For example, in San Juan, 1,400 millimetres (55 inches) of rain per year fall, including more than 100 mm (4 in) per month between May and December, while the driest months, with about 55 mm (2.2 in) of rain per month, are February and March, that is, at the end of the period of the trade winds, when they become weaker.
Here is the average precipitation in the capital San Juan.
Average precipitation - San Juan
San JuanJanFebMarAprMayJunJulAugSepOctNovDecYear
Prec. (mm)805060901451201251501501501401151375

The rainiest area is the interior, in particular the north slopes of the Cordillera Central, and even more those of the Caribbean National Forest (or El Yunque), where there is no real dry season. On Pico del Este, about 1,000 metres (3,300 feet) above sea level, 4,300 mm (170 in) of rain per year fall.
By contrast, along the southern coast, which is sheltered from the trade winds, rainfall often drops below 1,000 mm (40 in) per year, and winter is particularly dry, as happens in La Parguera and Ponce, but also June and July are not very rainy.
Here is the average precipitation in Ponce.
Average precipitation - Ponce
Prec. (mm)252540559565651101501609535915

The small island called Isla Mona, to the west, is almost arid, while Vieques, to the east, is a bit rainier, since it receives 1,070 mm (42 in) of rain per year.
There is also a difference in climate between the western and the eastern coast of Puerto Rico: the rainy season is slightly longer on the east coast, where it lasts until January included, while on the west coast it lasts until November or mid-December.
Anyway, the rains in Puerto Rico occur mainly in the form of showers or thunderstorms, which usually do not last long, therefore the amount of sunshine is always good, as can be seen in the following table.
Sunshine - San Juan
San JuanJanFebMarAprMayJunJulAugSepOctNovDec
Sun (hours)889989998777

Puerto Rico

The sea is warm enough for swimming all year round: the water temperature ranges from 26 °C (79 °F) from January to March, to 29 °C (84 °F) from August to October.
Sea temperature - San Juan
San JuanJanFebMarAprMayJunJulAugSepOctNovDec
Sea (°C)262626272728282929292827
Sea (°F)797979818182828484848281

From June to November the archipelago can be hit by tropical storms and hurricanes, with a higher probability between August and October. The archipelago was hit hard by Hurricane Georges in September 1998, and by Hurricane Maria in September 2017.
However, even not very intense tropical storms can produce heavy rains in the inland mountain areas, which can cause landslides and floods.

When to go

In general, the coolest and least rainy period in Puerto Rico runs from December to March, which is also outside of the hurricane season; more in particular, the best time is February-March along the north and east coasts, and from December to March along the south and west coast, because they are generally the least rainy periods. In April there is a certain increase in rainfall, especially in inland areas, while the rains on the southern coast are still quite rare.
In summer, the heat is sweltering and showers are frequent, although they generally occur in the form of downpours and thunderstorms, which soon make room for the sun. However, there is a certain risk of tropical storms and hurricanes. If you want to visit Puerto Rico in summer, you may prefer the south coast, which is less rainy, especially in June and July, when there is a certain decrease in precipitation, in addition, the risk of hurricanes is lower than in August.
The Americans have introduced the habit of using air conditioning, so inside buildings the temperature is often much lower than outside, so it can be useful to bring some warmer articles of clothing, at least for those who are sensitive to cold.

What to pack

From December to April: light clothes, a sweatshirt for the evening.
From May to November: tropics-friendly, lightweight clothing, possibly a light sweatshirt and a light raincoat for thunderstorms; a light sweatshirt and pashmina for airconditioned places.