I've tried to have a simple rule for myself when it comes to talking about people: don't speak badly about someone behind their back. I think this is pretty commonly accepted as the polite thing to do.
There are some small caveats that I allow myself:
- I will say something badly of someone privately if I have already said the same thing in front of them. I have several artist friends that are not confident enough about their art. I've told them this to their faces, and so I have no issue saying it to others when they themselves aren't present.
The key feature here is that I must have already told them. It's easy to think "I'd say this to this person" then decide not to when faced with doing it. - I will say something badly of someone if I believe the information is important to the safety of an individual or community. Even then, I will restrict it to the relevant individual or community's moderators. I need to be confident of the accuracy of the information - I don't want to spread rumors or vague statements about "this person did a bad thing".
- Tangentially related: "I don't speak badly about people behind their backs" is a better comment than "I don't have anything bad to say about this person". If you say the latter sometimes but not always, people will know when you have something bad to say but aren't saying it.
I do not like to think about what people might be saying about me when I'm not there - good or bad - so I avoid saying negative stuff about people unless I know they know it.