The most pleasant months to visit are spring and late autumn. Taiwan has a largely sub-tropical climate with two distinct seasons, hot from May to October (with the summer months being especially humid) and cooler from November to March. The northern areas receive monsoon like rainfall from January to March, and are generally cooler than the south. The southwest monsoon starts in May and ends in late September. Heavy rainfall can occur any time of year, and the typhoon season generally runs from May into October.
Winters in Taiwan tend to be cool (average temperature of 15°C) and summers sweltering and humid (above 30°C) from June to September. The best time of year to visit is thus from October to December, although occasional typhoons can spoil the fun. Spring is also nice, although it rains more than during autumn. During the typhoon season, the east coast bears the brunt of the damage as it is facing the Pacific Ocean.
However, you might encounter temperate conditions when you head into mountainous regions. In fact, it snows every year on Taiwan's highest mountains and occasionally on mountains like Alishan so be prepared if visiting Taiwan's mountainous regions.