Judgement of other people involves two things - observation and interpretation. We first have to observe something in other people and then we have to interpret it, which usually means applying a context and larger meaning of what we observed. Judgement of others can be both positive and negative; for example, I may judge you as being a kind and considerate person, or you may judge me as being shallow and superficial. The problem with judgement tends to be in quickly coming to a negative conclusion about another person or having a fixed negative image of another person because this view ends up being harmful to us. Yet despite this, most judgments that we pass on others is unconscious, and when it's not, it is fully rationalized and justified without much introspection.
The act of judging serves a necessary function by allowing us to move forward in our lives rather than stalling at certain points from indecisiveness. Judgment helps us decide who we want to spend time with, who we will do business with, who is lying to us etc. The trade off is that in order to make a reasonably quick assessment of a person or situation, we risk coming to the wrong conclusions from time to time because we just don't know enough. The brain is an efficient organ; it makes observations and then assembles them into a reality shaped by our past experiences so that we can interpret it in a way that makes sense to us. The feeling that we understand our reality gives us enough security to make it through life somewhat sane, despite the fact that we may be wrong about what our reality actually is. I believe these cognitive processes evolved to get us from one day to the next and not to necessarily ensure that we live happy, spiritually aware lives. Thus, some of the very processes that help us survive physically can lead to the perpetuation of mental and emotional suffering because they facilitate negative illusions.
What many people may not realize is that every single judgement they make about other people is a direct projection and thus reveals more about themselves than anyone else. It must be a projection, for in order to interpret anything we have to have some sort of frame of reference. That reference is our own experience. When judgments involve criticisms of others, this is a projection of what we have internalized as a valid criticism of anyone, including ourselves. We may not necessarily realize this; in fact, it's likely entirely unconscious, but the only reason we would notice something negative about another person is if we have, in our own experience, judged such a thing to be negative in the first place.
Our past experience is like a slide show that our brain projects on our vision, so that we are never capable of seeing something as it truly is unless we are first aware that the slide show exists. Even then, the awareness itself may not be enough to allow for clear sight unless we have diligently trained the mind in experiencing consciousness as a non-identity, a non-Self. Without the lens of a personal identity, it may be possible to "see" accurately, although in my experience so far, this type of seeing is associated not just with non-judgement, but also non-action. I can do little more than sit still. If I need to physically move my body, make a decision, follow though on something, my mind snaps out of this blissful state and I'm right back seeing through a limited lens in order to get things done.
How we judge others ends up being a useful tool not because it improves our relationships with other people (it doesn't), but because it allows us to learn more about ourselves and to be curious about how we see the world. This is the insight that actually improves our understanding and relationships with other people. With this perspective and self-awareness, we have more opportunities for empathy, tolerance and progressive action.