Here is the short answer:
In terms of weather, the best time of the year to be in Taipei is considered to be fall (September to November) and to a slightly lesser extent spring (March-May).
But read on, if you want to know more about the climate and the four seasons in Taipei.
The Climate of Taipei
While the South of Taiwan has a tropical climate, the Northern part – where Taipei is located – experiences subtropical climate.
This means hot summers and mild winters, and a relatively high level of humidity during any time of the year. That being said, chances of rain are highest between June and October, while winter tends to be driest.
On the many cloudy days, it is easy to underestimate the UV radiation. Sunscreen is recommended if staying outside for a long time, or if you have sensitive skin.
In winter, temperatures rarely fall below 10°C/50°F and on warm days they can easily reach more than 20°C/68°F.
An average of four typhoons hit Taiwan every year, mostly during June to October. They can be extremely strong and cause damage to buildings and roads. When Taipei is expected to be hit by a strong typhoon, the city government can impose a “typhoon holiday” during which schools, offices and government agencies have to stay closed. It is recommended to stay inside during a typhoon as flying objects can be dangerous.
Sunny and warm spring weather can start as soon as February with Cherry blossoms announcing the end of the Taiwanese winter. Average temperatures are around 20°C/68°F but maximum temperatures reach the 30°C/86°F mark frequently in April and May. The amount of rain is less predictable; in some years spring is mostly sunny while in others it can rain all the time. Luckily, there is a lot you can do indoors in Taipei.
During the summer months of June, July and August, Taipei gets really hot and humid with temperatures between 28°C/82°F and 37°C/99°F during the day. It doesn’t cool down very much at night so people tend to keep the air conditioner running 24 hours a day during summer. The frequent rain and occasional typhoons also make this season less pleasant.
Fall months of September, October and November are much better for traveling around and spending a lot of time outdoors. September is usually still very hot and typhoons tend to occur until October but all in all this is usually the best season in Taipei.
Winter (December, January and February) are the driest months, though it can still rain occasionally. Temperatures rarely fall below 10°C/50°F but warm clothing is advised. Note that many buildings are not heated during winter.