My mother visited Yucatan scores of times during her lifetime, and eventually died at 92 during her last visit. She insisted on coming in 'the springtime' -- maybe because it was her birthday month, and maybe because she wanted to escape the winter cold. But she frequently didn't hit the dates right.
March 23rd, her birthday, could be uncomfortably hot. For a reason not easily explained or understood, the spring months in Yucatan are the hottest of the calendar year. And the driest. More days in April reach that uncomfortable magic temperature of 40 C. (104 F) than in any other month.
That temperature in South Georgia where I was born could send you to the hospital if you are not careful, but most of Yucatan, being a peninsula, receives afternoon and evening sea breezes. Rooftop and outside living is a joy.
Like most of the tropics, Yucatan has its Dry Season and its Wet Season. At some mystical day at the end of May or early June, the cumulus clouds reach greater heights and build over the eastern side of the peninsula and start their march across Mexico's thumb, and lets the rain fall in the afternoon, leaving the streets and parks washed clean. Plazas and parks to me are more enjoyable after those summer downpours.
If you come to the Yucatan Peninsula to enjoy the diving, water clarity is as its maximum during May -- why ? because there is no ground water coursing toward the sea taking contaminants. There are no visible rivers on the peninsula, but underneath great rivers of fresh water course through limestone caves with some of them actually bubbling up off shore. Seaside springs sometimes appear to be like an oil slick offshore when it's really just fresh water floating on top of the salty sea water.
For me, any time is a good time to visit, but for a typical tourist the answer of the best time has to be January, February, and early March, when the weather is sublime.