When is the best time to travel to Brazil in terms of weather?
Brazil is a huge country so it depends a lot on where you plan to go, but if you want to go to both north and south then october/november is a pretty good time of year.
The wetaher is quite nice and it's not brazilian holiday season so the hotels are not as packed as other times of year.
Where you going in Brazil?
If you go to the North and Northeast, you will find warm temperatures all the time.(i.e. Salvador, Fortaleza, Manaus)
Southern from Rio de Janeiro the temperatures drops from mid May till end of August.
In some places like Urubici the thermometres can drop bellow 0C.
Mentioned in this answer: