The climate of most of Thailand is governed by three seasons: rainy (roughly May-Oct), caused by southwest monsoon dumping moisture gathered from the Andaman Sea and the Gulf of Thailand; cool (Nov-Feb); and hot (March-May).
If you plan to focus on the mountains of the northern provinces, the hot season (March to May) and early rainy season (June to July) are not bad either, as temperatures are moderate at higher elevations. Haze from the burning-off of agricultural fields during these months, however, does obscure visibility in the north. Northeastern and central Thailand, on the other hand, are best avoided from March to May, when temperatures may climb over 40°C during the day and aren’t much lower at night. Because temperatures are more even year-round in the south (because it’s closer to the equator), the beaches and islands of southern Thailand are a good choice for respite when the rest of Thailand is miserably hot.