In Matthew 7:1-5 Jesus speaks about judging others. The passage begins “Do not judge so that you will not be judged.” (NASB) I have often heard people refer to this passage (incorrectly) by saying “You can’t judge me!” or “Only God can judge me!” Nothing could be further from the truth or the intent of the passage.
It is the duty of parents, pastors, and other leaders to judge those they are responsible for. In 1 Cor 5:3 Paul wrote “For I, on my part, though absent in body but present in spirit, have already judged him who has so committed this, as though I were present.” We know that God cannot contradict Himself, so there is obviously an appropriate way to use judgement.
I think you could paraphrase Matt 7:1-5 like this: “Stop gossiping and tend to your own morality and growth then, in time, you will be qualified to help a struggling brother or sister deal with their moral issues.
We are supposed to use judgement when it is appropriate, and when we do make judgements our goal should always be to edify someone, never to tear them down, belittle them, or make ourselves feel superior.