The ranking of your school matters to the extent that it translates to much better job offers once you have your degree. You are also more likely to be considered for grants, fellowships, etc. So just like going to a top school for undergrad gives you more opportunities, you have more options when you go to a top grad school. That being said, if you would be much happier at the lower ranked school, then you have to take that into consideration. I've been at a top ranked school for the past 4 years and personally, i'm sick of the rat race and want to go someplace where i won't feel guilty if i actually have a life outside the lab. Therefore my happiness will be a huge factor in my final decision. Of course, when i say that i'm saying that i will probably choose a place that is top 30 rather than top 10. And there's a BIG difference between top 10 and top 100. BIG.