Rio de Janeiro is a big city so the answer to this question depends on the neighborhood. Personally, I will not recommend you to walk alone in any area at night but if you are with people (i.e. people from your hostel), go ahead and do it! Just never do it alone.