Map from Google - Playa_del_Carmen

Playa del Carmen, the most popular resort of the Riviera Maya, located in the Mexican state of Quintana Roo, has a tropical climate, hot all year round, with a relatively cool and dry season from November to February, and a hot, muggy and rainy season from June to October. From March to May, before the rainy season, the heat gradually increases.
Here are the average temperatures.
Average temperatures - Playa del C.
Playa del C.JanFebMarAprMayJunJulAugSepOctNovDec
Playa del C.JFMAMJJASOND
Min (°C)191920212223232323232119
Max (°C)282931323332333332312929
Min (°F)666668707273737373737066
Max (°F)828488909190919190888484

Rainfall amounts to 1,400 millimetres (55 inches) per year; in the rainy season, the rains have two peaks: at the beginning (June) and the end (September-October), therefore in July and August the rains diminish a bit, not reaching 150 mm (6 in) per month. In May, November and December, ie before and after the rainy season, there can be showers as well, those of May due to the heating which is already intense, while those of November-December are due to the fact that after the summer the sea is still warm, so the northeast trade winds reach the coast after picking up heat and moisture from the sea. However, the rains come in the form of downpour or thunderstorm, short and intense, which do not reduce the sunshine hours by much.
Here is the average precipitation.
Average precipitation - Playa del C.
Playa del C.JanFebMarAprMayJunJulAugSepOctNovDecYear
Playa del C.JFMAMJJASONDY
Prec. (mm)75554045110190120145235215105951430
Prec. (in)32.21.61.84.37.54.75.79.38.54.13.756.3
Days65337121213151377103

Due to the prevalence of easterly winds all year round (which are a bit cooler in the period from December to March, and hot and humid from May to October), temperatures in the Riviera Maya do not vary significantly throughout the year, but the tourists intending to go to the interior of Yucatán in search of Mayan archaeological sites, should know that in the period from March to May that area is really hot.
During winter, from December to mid-March, Playa del Carmen as the rest of the coast can be reached by a cool wind from the northwest, the Norte, preceded by clouds and some rain. On these occasions, the temperature can drop to 13/15 °C (55/59 °F) at night, and remain around 20/22 °C (68/72 °F) during the day.
In the period from June to November, but especially from August to October, Playa del Carmen like the rest of the Caribbean area can be affected by hurricanes, tropical cyclones of the North Atlantic Ocean, which rarely affect a given place, but they are dangerous because they can bring strong winds and heavy rains.

The amount of sunshine in Playa del Carmen is good from March to May, while it is only decent in the rest of the year, given that more or less widespread cloudiness can form, in the rainy season (June to October), or the first period of the trade winds (November-December), and in the period of the cold fronts from the United States (December to February, and sometimes the first half of March).

Playa del Carmen, from above

For swimming, the sea is warm all year round, since the water temperature ranges from 26 °C (79 °F) from January to March, to 29 °C (84 °F) from August to October.
Here are the average sea temperatures.
Sea temperature - Playa del C.
Playa del C.JanFebMarAprMayJunJulAugSepOctNovDec
Playa del C.JFMAMJJASOND
Sea (°C)262626272828292929292827
Sea (°F)797979818282848484848281

When to go

The best time to go to Playa del Carmen, for swimming and sunbathing, runs from mid-March to late May. Generally you can also go from December to May, but keep in mind that from December to mid-March there can be cool days, cloudy and windy, so it's better to bring a sweatshirt for the evening, especially if you are sensitive to cold; maybe you can take advantage of these cool days to organize a trip to the Mayan sites.
It should be recalled that in May the first thunderstorms occur, and in April and especially in May heat and humidity increase.
November would be a good month, but there is still some risk of hurricanes, though low. In July and August it's hot and humid, there are showers and thunderstorms, which, however alternate with long periods of sunshine, but there is also some risk of tropical storms or hurricanes.