The phrase "judge not" gets thrown around a lot by defensive people. It should be no surprise that the context makes all the difference.
1 “Judge not, that you be not judged. 2 For with what judgment you judge, you will be judged; and with the measure you use, it will be measured back to you.3 And why do you look at the speck in your brother’s eye, but do not consider the plank in your own eye? 4 Or how can you say to your brother, ‘Let me remove the speck from your eye’; and look, a plank is in your own eye? 5 Hypocrite! First remove the plank from your own eye, and then you will see clearly to remove the speck from your brother’s eye.
6 “Do not give what is holy to the dogs; nor cast your pearls before swine, lest they trample them under their feet, and turn and tear you in pieces.
Clearly, Jesus is saying hypocritical judgement is wrong. Don't think you're taking the high ground when you condemn the steamy soap opera your wife watches if you're flipping through the pages of a Sport Illustrated Swimsuit Edition. The rest of the New Testament has further cautions against self-righteous, unforgiving, or unfair judgement. James 3:1 offers this sobering warning to those who interpreting scripture: My brethren, let not many of you become teachers, knowing that we shall receive a stricter judgment. God has no intention of cultivating a judgemental culture in His church.
That said, judgement, discernment, and even confrontation of sin when it's in a believer's life, are the responsibility of those following Jesus. It takes discernment to follow Jesus command in verse 6 of the very passage we're looking at. Jesus says in John 7:24 "Do not judge by appearances, but judge with right judgment.”
So we should judge, but if we're doing it hypocritically and unlovingly, we're signing up for judgement ourselves.