I asked the locals in Cancun when the rainy season is/rainiest month and they said October. I had relatives (60+ yr olds) who always went in Dec. and they said the water was too cold to swim in but the weather was not unbearably hot. I've always gone the end of May through mid-July and there are more families visiting then. Only problem is you have to stay in the water/shade or indoors to stand the heat.
If I could go whenever I want...I'd go in February as the water might be warmer and no crowds because school is in session.