Matthew 7:1 says this: “‘Do not judge, so that you will not be judged.”
I’m leaning heavily here on what the Bibleref site has to say about this verse. Here it is:
This may be the most often-misused verse in the entire Bible. Modern culture garbles this comment into a command to never disapprove or correct the actions of another. This mishandling of Christ’s words is out of context three times over. First and foremost, Christ does not say “never judge,” He warns that there is a consequence to judgment. Second, this statement is immediately followed by instructions from Christ on the proper way to use judgment. Third, Jesus’ other teachings explicitly indicate that right judgment is necessary (John 7:24), while hypocritical or shallow judgment is wrong.
Even so, this verse—especially the first two words in most English translations—is a favorite quote of those attempting to twist Scripture.
Jesus has been teaching within the context of Israel’s religious leaders and the way they practice their righteousness (Matthew 5:20; 6:1). He has called out as hypocrites those who call attention to themselves as they give to the needy and pray and fast. Under their leadership, Israel’s worship of God had become about proving one’s worthiness to other people instead of humbly serving God. So, on the one hand, righteous acts were performed to get approval from others. On the other hand, controlling religious leaders looked for opportunities to express condemnation against those they didn’t see as sufficiently pious.
Following that example, the everyday people of Israel learned to perform religious duty for others’ approval, and to belittle those who did differently than they preferred. The result was a false religious experience: pride and fear of judgment instead of humility and graciousness to others.
In that context, Jesus says to the crowds of Jewish people following Him not to unfairly judge others in order not to be unfairly judged. He is talking about having an arrogant attitude: taking the place of God. Lack of humility and grace in how we perceive others leads us to wrongly declare one person’s righteousness worthy and another person unworthy merely based on our assumptions. To judge in this way is to assume authority over others that God has not given. In the end, God will judge those who judge in this way.
This does not teach that God’s people should never express an understanding of the difference between right and wrong. In a crystal-clear statement, Jesus teaches in John 7:24 that His followers must be careful to make right judgments instead of judging others by external appearances. Also, God often gives Christians the responsibility to make judgments about truth and falsehood (Galatians 1:8–9; Philippians 3:2; 1 John 4:1) and to hold fellow Christians accountable for sin (1 Corinthians 5:5).
What is condemned here is shallowness and hypocrisy: passing judgment on other believers as if one were God. This sneering kind of condemnation is clearly and repeatedly forbidden (Romans 14:10–13; James 4:11–12).
Shallowness and hypocrisy. This is what is condemned here. Our thoughts, our words….this is what Jesus is warning us against. Our opinion of others….oh that we would see with His eyes and hear with His ears.