If someone said: "Don't go to the store or you'll waste your time. First check the pantry, make a list, and then go to the store."
Would you summarize by saying "Don't go to the store"?
No. That would distort the true meaning.
Matthew 7:1-5 says we shouldn't judge others if we're using one standard for ourselves and another standard for others. It says we must first deal with our own sins and then we'll be able to tell others about their sins.*
So why do so many people quote only the first sentence of the passage and insist that "we have no right to judge others"?
That distorts the true meaning of the passage.
That's why it's important to know what the Bible teaches, not what people think it teaches (2 Timothy 2:15).
* "first take the plank out of your own eye, and then you will see clearly to remove the speck from your brother’s eye."
Because this passage is frequently used to rebuke anyone who speaks against sin, I have created an archive of 1-minute devotions on the subject of appropriate Biblical judgement, all containing relevant Scriptures. You'll find that archive HERE.