A careful examination of Christ's command, "Do not judge, or you too will be judged" (Matthew 7:1), in light of what He said next, indicates His meaning. He said, "You hypocrite, first take the plank out of your own eye, and then you will see clearly to remove the speck from your brother's eye" (Matthew 7:5).
Jesus was saying that we should not seek to correct a person when we are guilty of the same or another offense. We need to deal with our own sin, and then we can help someone else. He never intended that His disciples should set aside all exercise of discernment or judgment.
Later in the same message Jesus said, "Watch out for false prophets ... A good tree cannot bear bad fruit, and a bad tree cannot bear good fruit ... Thus, by their fruit you will recognize them" (Matthew 7:15-20). Through an examination and knowledge of God's Word, we may discern the quality of another's words and deeds. However, keep in mind that ultimately God alone knows the motives and intent of a person's heart.
It is also important to consider the spirit in which we seek to correct someone else. Even if we are not guilty of the same offense, we have been guilty enough of other offenses. We need to judge or correct another in a spirit of love, compassion, and humility.
The Bible says, "Brothers, if someone is caught in a sin, you who are spiritual should restore him gently. But watch yourself, or you also may be tempted. Carry each other's burdens, and in this way you will fulfill the law of Christ" (Galatians 6:1-2).