Brazil is nearly the size of the United States which makes it very easy to understand that climates vary significantly throughout the country. The country can be broken into four distinct climate regions: the Amazon Basin, the plateau, the coastlands, and the southern states.
Located along the equator, the Amazon Basin receives nearly 2000mm (80") of rain each year and generally has no designated dry season as the rainfall is quite uniform all year round. The temperatures in this region average 27-32°C (80-90°F) though cold temperatures of around 10°C (50°F) will exist once in a while in the southern portion of this region. The region generally does not reach 38°C (100°F) though it is possible. Because of the humidity, these high temperatures can sometimes be quite uncomfortable.
The plateau region, much like the Amazon Basin, is a very large area. However, because it is located further south and at a higher altitude the climate is very different. Unlike the basin area, this region has a distinct wet season from October to April. In the northeast portion of the plateau region the rainfall is less and is very unpredictable.
The east coast of Brazil experiences a hot tropical climate, and the humidity can still be quite obvious. Near the mouth of the Amazon, generally all months are very wet with the greatest rainfall from December to May. The rest of the region generally experiences similar climate though the rainy months shift slightly.
In the South, the different seasons are determined by temperature variations rather than rainfall. The climate is much more temperate but sometimes can be quite cold with frost during the winters and sometimes snow in the mountains.
The cities of Sao Paulo and Brasilia experience temperatures averaging 15 to 30°C (59-86°F) while Rio de Janeiro on the coast averages 23 to 27°C (73.4-80.6°F). The cities in the far south reach temperatures below freezing.
Considering the different temperatures and climates, the best time to travel to Brazil simply depends on which parts of Brazil you plan to visit.