We are to judge, but righteously. Since our righteousness is filthy rags (Isaiah 64:6), we cannot judge righteously by our righteousness. This means we have to get ourself right with Christ before judging. Then our eyes and perspective will change. We will judge in a far different way, aimed at the heart of man which is the spiritual issue that is revealed in the outward appearance of men.
Read Matthew 7:1-5 & John 7:24