The best time to visit Chiang Mai is during The Thailand High Season which is between October and April when the weather is cool - visiting between April 12th and 16th is even better as you'll get to experience the celebrations for the Thai New Year or Songkran as it's called - the water festival.
Chiang Mai can also be visited at other points of the year but be prepared for each season as you might encounter conditions that you didn't want in terms of weather, social, and travel conditions in general.
😎 High/Cool Season (October to March) - This is the time when all the beaches, temples and other attractions will be the most crowded. There'll be plenty of backpackers at hostels, and plenty of opportunity to socialize and have fun.
The weather will be cool relative to Thailand (30°C or 86°F on average) and it'll be the perfect conditions to see and do almost anything you were planning on doing.
🔥 Hot Season (March to June) - This is when the heat will pick up significantly, for those who can't handle it, this won't be fun. But for those who love the heat, you'll have the added perk of there being less tour groups and more backpackers.
Songkran, the Thai New Year is also technically in this season, at the start. If you choose to go to Chiang Mai at the end of High Season and Start of Hot season, this will be the perfect time to experience this festival in arguably the best city to experience it in.
🌊 Monsoon Season (June to October) - Rain and tropical thunder storms every day. It'll pour down in buckets for 2-3 hours and then it'll be sunny again, that's what happens most days during this season. Though you'll get thunderstorms as well - sometimes going for most of the day or night.
This isn't everyone's cup of tea, most people should we say. But it's still quite safe to be in Chiang Mai or Thailand in general during this season. You'll just be greeted with rain a lot of the time - followed by sun.
Here are some other travel hot spots around the world with the high and low seasons as well.