The verb krinō ("judge") has a wide semantic range: "judge" (judicially), "condemn," "discern." It cannot here refer to the law courts, any more than 5:33–37 forbids judicial oaths. Still less does this verse forbid all judging of any kind, for the moral distinctions drawn in the Sermon on the Mount require that decisive judgments be made. Jesus himself goes on to speak of some people as dogs and pigs (Mt 7:6) and to warn against false prophets (vv. 15–20). Elsewhere he demands that people "make a right judgment"
Jesus' demand here is for his disciples not to be judgmental and censorious. The verb krinō has the same force in Romans 14:10–13 (cf. James 4:11–12). The rigor of the disciples' commitment to God's kingdom and the righteousness demanded of them do not authorize them to adopt a judgmental attitude. Those who "judge" like this will in turn be "judged," not by men (which would be of little consequence), but by God (which fits the solemn tone of the discourse). The disciple who takes it on himself to be the judge of what another does usurps the place of God (Rom 14:10) and therefore becomes answerable to him. The hina mē ("in order that … not"; NIV, "or") should therefore be given full telic force: "Do not assume the place of God by deciding you have the right to stand in judgment over all—do not do it, I say, in order to avoid being called to account by the God whose place you usurp"
“Matthew,” Expositor’s Bible Commentary, 183.
the command to judge not is not a requirement to be blind, but rather a plea to be generous. Jesus does not tell us to cease to be men (by suspending our critical powers which help to distinguish us from animals) but to renounce the presumptuous ambition to be God (by setting ourselves up as judges
when he says, Judge not. It is not necessary that believers should become blind, and perceive nothing, but only that they should refrain from an undue eagerness to judge: for otherwise the proper bounds of rigor will be exceeded by every man who desires to pass sentence on his brethren.
Commentary on Matthew
we must carefully note the exact meaning of "judge" (κρίνετε); in this context it does not mean a court trial or admonition. It cannot refer to discerning or evaluating right and wrong. All such are valid for believers (e.g., 1 Cor 5:5; Phil 3:2; Gal 6:1; Heb 3:13; 1 John 4:1). So what does this judgmental attitude connote? It means looking down on a person with a superior attitude, criticizing or condemning them without a loving concern (the opposite of the second we-petition on forgiveness, 6:12).
The key component is the absence of love. Admonition has a humility that says, "I love you enough to want to help you, and tomorrow you will need to correct me." There is no sense of superiority, no desire to make yourself look good at the expense of another. Bruner says this prohibition is the flip side of the fifth beatitude (5:5, "God blesses those who are merciful") as well as of the fifth petition of the Lord's Prayer (6:12, "forgive us our sins") and recapitulates the commands in ch. 5 against anger, revenge, and hate
Zondervan Exegetical Commentary on the New Testament (Grand Rapids, MI: Zondervan, 2010), 257–258.