Yucatan, where it is

The Yucatan Peninsula, which includes the Mexican states of Yucatan, Campeche and Quintana Roo, but also a part of Belize and Guatemala, has a tropical climate, with a rainy and muggy season from June to October, a relatively cool season from November to February, and a hot season from March to May, when the highest temperatures of the year are reached, with peaks of more than 40 °C (104 °F). This increase in temperature before the rainy season is particularly pronounced in the western and southern parts of the peninsula, that is, on the coast overlooking the Gulf of Mexico (where cities such as Merida and Campeche are found) and in the interior (where the ruins of the Mayas are found), while it's felt less along the east coast overlooking the Caribbean Sea, that is, in Cancun and the Riviera Maya.
Here are the average temperatures of Pisté, situated near the archaeological site of Chichén Itzá, in the interior of the peninsula.
Pisté - Average temperatures
Min (°C)141517182021212020191715
Max (°C)293033343534333333313029
Min (°F)575963646870706868666359
Max (°F)848691939593919191888684

Precipitation hovers between 900/1,000 millimeters (35/40 inches) per year on the west coast and between 1,200/1,400 mm (47/55 in) on the east coast; the rainiest period, as mentioned, is from June to October.
Here is the average precipitation in Pisté.
Pisté - Average precipitation

Cenote Ik Kil

In winter, from November to February, the temperatures are high, in fact the daytime temperatures hover around 28/30 °C (82/86 °F), while at night they are pretty cool, around 15 °C (59 °F), at least in inland and northern areas. Weather fronts from the United States pass quite frequently, able to bring a bit of rain, and followed by a cool wind, el norte, which can lower the temperature to around 10/12 °C (50/54 °F) at night and to around 20/22 °C (68/72 °F) during the day.
By February, the temperature begins to rise, at least in inland and western areas, in fact the temperature can easily exceed 30 °C (86 °F), although the norte often returns to lower the temperature, until mid-March.

Spring, from March to May, is actually the hottest season of the year, especially in inland and western areas: in Campeche and Mérida, highs in April and May are normally around 35/36 °C (95/97 °F), but they exceed 40 °C (104 °F) with relative ease. Along the east coast, in the Riviera Maya, it does not get as hot as in the interior, although there's still an increase in temperature and humidity. By May, some thunderstorms begin to occur because of the greater amount of heat available.

Summer, or rather the rainy season, from June to October, is hot and muggy, with many hours of sunshine, but also with downpours or thunderstorms. There is also the risk of hurricanes, from June to November (but with a higher probability from August to October). During periods of good weather, however, it can still be very hot, with highs above 35 °C (95 °F).

Chichen Itza

The amount of sunshine in Yucatán is good all year round, but especially from March to May, ie after winter and before the rainy season. In winter, there can be some cloudiness due to cold fronts from the United States, while in the rainy season (when, however, there's no shortage of sunshine), some areas of instability can form, which can cause thunderstorms, but also some scattered cloud banks, while the sky can be overcast for several consecutive hours during hurricanes, which fortunately are relatively rare. Here are the average sunshine hours per day in Pisté.
Pisté - Sunshine

The sea in Yucatan is warm enough to swim in all year round, as we can see in the following table, regarding the temperature of the sea near Campeche.
Campeche - Sea temperature
Temp (°C)252525262829292929282727
Temp (°F)777777798284848484828181

Best Time

The best time to visit Yucatan and to go hiking in the Mayan archaeological sites is from December to February, since it is the least hot and humid of the year. During the day, it can be hot and sunny, so it's better to bring a hat and sunglasses; at other times, it is mild or pleasantly warm during the day, while it can get even a bit cold at night: it is better to bring a sweatshirt or sweater for safety.
In November, the weather is already similar to that of winter, but we are still in the hurricane season.
In February, it can already be very hot, so the best months are December and January. Those who can stand the heat can also go from March to May, since it is still the dry season, but must take into account the heat, which can sometimes be oppressive, with peaks above 40 °C (104 °F), especially in May, when also the first afternoon thunderstorms occur. On hot days, however, you can escape in the cenotes, caves with natural pools of fresh water.
As previously mentioned, the sea in Yucatán is warm enough for swimming all year round, although from December to mid-March, sometimes the air is a bit cool and the sky is cloudy.