The best time to visit Samui is from February to April. This is when the island is at its driest. Rainfall is less than two or three inches per month. The only drawback to a visit at this time of year is that hotels tend to raise their prices during the tourist "high season."
Traditionally, the "worst" time of year to visit is October to December. This is the wettest time of year. Of course, even during the rainy season, rains fall only for an hour or two per day. The rest of the day may well be mostly sunny.