That word 'judge' is much better translated as 'condemn', because that's not our job. If anyone needs any proof of that, just note that Jesus immediately told us to make judgments about people.
So, we're told that when we can see clearly, we should make judgments about the speck in others' eyes. Then we're told to make judgments about who are dogs and pigs.
The "judging" (krínō) that we are told not to do has the underlying meaning of arresting, suing, or taking to court. We are not to hope for or take delight in the thought of others receiving the just penalty of their "faults/sins". But we are not to "ignore" their sin, and we are definitely not to refuse to make distinctions between right/wrong.
Four chapters later, Jesus called John the Baptist, basically, the greatest guy ever. This was the same John the Baptist that walked around street preaching, telling people they were a bunch of horrible sinners that deserved Hell, and warning them to repent (turn from their sins) and be baptized.