The strict meaning of the word “judge” is to distinguish, to decide; and the variety of applications possible to such a word is evidenced by the fact of the variety of ways in which it is translated in our New Testament. In the KJV it is translated in all these ways: avenge, condemn, decree, esteem, go to law, ordain, sentence to, think, conclude, damn, determine, judge, sue at the law, call in question. There is no value in that grouping save as it reveals the fact that the simplest thought in the word is that of distinguishing decision. Sometimes the decision may be adverse, sometimes it may express itself as a decree determined upon, sometimes it may express itself as a sentence to be carried out. All these varieties are seen in the translations made use of. The simplest thought is that of distinguishing, coming to a decision. Sometimes it runs out into action, sometimes it conditions a passive position. Therefore its particular sense must always be determined by the context. Here, evidently, the Lord did not use the word “judge’ in the sense of forbidding us to discriminate, to distinguish, to decide. There can be no doubt whatever that He used it of coming to adverse conclusion in the sense of condemnatory censoriousness. “Judge not,” condemn not, come to no final decision, do not usurp the throne of judgment or pass a sentence, or find a final verdict.” — Morgan, page 72.
Verse 2 is saying that those who judge will be judged by the same standards they use to judge others.
speck (v.3) = small chip of wood, piece of sawdust, mote
plank (v.3) — some commentaries state that this is from a word that means “splinter,” not a huge board of lumber. But either way, it’s referring to something larger and more incapacitating than a mote
hypocrite (v.5) = actor, one who wears a mask
He did not say, “Then shalt thou see clearly the mote,” but, “Then shalt thou see clearly to cast it out.” The man with the beam is the man who is looking for the mote, and beholding it. Notice the question, “Why beholdest thou the mote?” You criticize it, you attack it, but you cannot move it. Get the beam out of your own eye, get the passion for criticism removed, get the … endeavor to find the mote destroyed; and then you will see clearly, not the mote, but how to remove it. The power for removing the mote to which you object lies, not in the acuteness of your vision, but in the passionate love which makes you desire to remove it. And so with the beam of censoriousness and criticism gone, you will be able to take the mote out of your brother’s eye. — Morgan, page 73.
Verse 6 is saying that, while we should not judge quickly or with hypocrisy, we should use discernment and not get close to those who reject the truth.
The issue here, as I see it, is setting up your own standards of righteousness, especially as relating to motives, as the Pharisees did, and then judging others by those standards. The Lord isn’t saying that we shouldn’t judge based on truth.
The Lord Himself in John 7:24, said “Judge not according to the appearance, but judge righteous judgment.”
Surely our Lord indicated by these words that His hearers should judge — fairly and rightly, though hypocrites (as in Matthew 7:1-5) should take care not to judge at all. Thus God calls upon His people, not merely to judge others, but to be such as are qualified, morally and spiritually, to judge in matters where truth and error, and right and wrong conduct, are concerned. — Stam, page 114.