My advice is a little different. I definitely agree that you will have to get to know the department to know.
But, I don't think it's a good idea to try to guess ahead of time whether or not you will be happy/thrive in an environment. A lot of schools with good and bad environments won't have enough data available to develop a reliable proxy. Also, what is "good" for one person can be different from another.
It's fine to talk to other people about their experiences at a school, but I would be careful to find out things like when did they have their good/bad experience. Since grad students change very often, the environment can change in just a few years. And again, everyone will experience things differently based on who they are and what they value.
So, my advice would be to *not* consider this when it comes to choosing schools to apply to, unless something recently happened that is a giant red flag for you. I would wait until the schools make their decisions and then use the school visits to get first hand experience on what the environment is like. You will be able to learn a lot more from interacting with students and seeing it for yourself.
The reason for this advice is that while proxies like bfollinprm suggested are fairly good, I think it's easy to accidentally use them to take a school off your list when the environment might be good for you. I think the cost of applying to a school, getting accepted, and then visiting and learning that the place is terrible for you is much lower than the cost of not applying somewhere based on wrong, outdated, or incomplete information.