Visit Kodai from April to June or August to September. This is when the weather is at it's best - temperatures stay in the region of a comfortable 20°C to a bracing 10°C.
The summer festival that is held at all Tamil Nadu hill stations in May features flower shows, dog shows, boat races and the like. This is the high season, so Kodai becomes a little more crowded than usual. July to October are also great months weather-wise, less full, and cheaper.
The months between October and March are wet and cold, so it is best to avoid being here at this time