This is like asking "is the United States safe?" South Philly? Beverly Hills? Wyoming?
First off - Brazil is a HUGE country. Lots of things to see. Every state has its own totally different climate.
Is it safe? Generally, much safer than 4-5 years ago. Still tons of poor people around, but the economy is going like gangbusters. Sao Paulo is not generally safe at all, but you have no compelling reasons to visit Sao Paulo.
Rio has gotten much safer, but also pretty damn expensive - tons of oil money flowing into the city. About 1/2 of the city's population live in favelas that aren't marked on the maps. You have no reason to travel there. If you stay in the southern part of Rio (Ipanema, Leblon, Tijuca), and take taxis around at night, you'll be perfectly fine. (stay out of Copacabana.) The big tourist spots are perfectly fine during the day. Taxis are cheap and a safe way to go nightclubbing. The bars/nightclubs in Lapa are not to be missed.
Like many developing countries, you'll want to watch your valuables. In Rio the general rule is to a. keep your valuable stuff in the hotel safe; b. go out with perhaps 1 credit card and the cash you need for the day, and a xerox of your passport for ID. Pickpockets are around, but if you use your head and are relatively careful you'll be fine.
Some great cities; Rio. Salvador. (again, lots of pickpockets); Recife, Fortaleza. The Amazon is something, but that's a separate trip - takes hours to get there & you have to book a resort, which is quite expensive.
The weather will be a bit cooler in Rio - 60-70 degrees. Probably drier. Tons of good food, good drink (Brazilian fruit juices are amazing, and can't be found anywhere else). The people are gorgeous, charming, very proud of their country and want to show it off.
There are nice hotels to be had. Just keep in mind Ipanema and Copacabana have hundreds of by-the-hour hotels for sex/prostitution. You'll know when you see one.
If you can, learn a little Portuguese - not too many strong English speakers around, though they do understand Spanish.
So yeah, I'd highly recommend it. Not as cheap as it used to be, but perfectly safe if you use your head. (And don't go chasing rent boys on the street like R9 obviously did)