--2 Timothy 4:1
Usage of the word 'judge' in these cases indicate that the type of judgment warned against is that of presuming to determine if someone is or is not worthy to receive the gift of salvation. Not even Christ did this during His mission on earth as we can see by His words in John 12:47:
In avoiding an ugly self-righteousness, we must first remember that we are all sinners. As sinners, we realize that we are saved not by ourselves but by grace. We can only practice the observational powers given us in regard to actions as measured against the Word of God, as in recognizing a tree by its fruit. Paul wrote in Phillipians 1:9-11:
When we exercise judgment based on the Word of God, there will be outcry from those who wish to continue in immoral behavior without hearing flack about it. In an effort to shut you down, they will pick out the lone verse of Matthew 7:1. In response, do not be tricked and do not back down. Arm yourself with the courage that comes from a wider spectrum of spiritual knowledge.