like others say it depends where abouts in the country you will be.
i hear ko samet has the driest climate in the whole of thailand (rayong province) less than 2 hours from bangkok
and ranong province on the west coast near burma has the wettest climate in the whole of thailand.
i would say avoid andaman side (west coast) phuket,phi phi,krabi,trang etc between may-october/november)
avoid bangkok may-november (i was there in august/september and it rained everyday almost allday without fail,flooded streets everyday guranteed

)
avoid east coast (gulf of thailand,islands ko samui phangan,tao etc) between october/november - january/february
as for the north of thailand im unfamiliar with so cant comment personally,although this site has some very useful information with regards to weather forecasts and patterns.
Thai Meteorological Department
chohkdee