One of Jesus's oft-quoted statements is, "Judge not lest ye be judged." (At least, this pronouncement seems to get quoted to Christians a lot!) How does this co-exist with Paul's stern exhortation in I Corinthians 5? "Is it not those who are inside (the Church) that you are to judge?"
It's a classic conundrum. What does it mean to "judge"? And are we supposed to judge no one, or are there different rules for Christians and non-Christians?
Let's keep it basic and practical. Let's say "judging" someone means to make a spiritual evaluation of a person and determine that he or she is a "sinner." This also assumes that you are putting yourself in a higher, holier position by making this assessment.
When Jesus issued his famous injunction against judging in Matthew 7:1, his primary concern seems to be hypocrisy. This is the same section of scripture that talks of having a log in your own eye while trying to take out the speck in a brother's. The act of judging, then, imperils ourselves because we are liable to be guilty of the same things we are accusing others of.
Paul is talking about a different case - the determination of whether the Church (i.e. Christians) is acting in accord with righteousness or not. What happens when the Church accepts a sin, as was apparently happening in Corinth? A man was engaged in sexual immorality with his stepmother. Paul is saying that is not cool. His meaning seems to be that the Church needs to stand for something or it will fall for anything.
The Church needs to have a standard by which to make decisions (judgments) about acts that are acceptable or are not. We need to be able to judge and discipline among ourselves. Judging the world in this case is not our concern - that's up to God.
In today's world, this is a live issue. If certain sins are "winked at" by the Church and given a free pass, is that right? In various congregations, you can find people accepting of gluttony, or homosexual acts, or divorce, or cheating on taxes, or viewing pornography, or drunkenness, or sloth. Yet that doesn't change what the Bible says or what the truth is. Judgments about spiritual matters must still be made for the Church to have a cohesive, biblical witness.
Paul's concern isn't to make ourselves feel better about our own supposed righteousness, but about leading others to genuine repentance and life in Jesus Christ!