"Ye shall do no unrighteousness in judgment: thou shalt not respect the person of the poor, nor honor the person of the mighty; but in righteousness shalt thou judge thy neighbor" (Lev. 19.15). "Do not judge by appearances, but judge with right judgment" (John 7.24).
We are frequently exhorted not to judge, by both Jesus and Paul. On the other hand, we are also told to exclude people from fellowship in some circumstances.
Also see Rom. 14.1-15.4, to not be too harsh on the weaker brethren. "It isn't my responsibility to judge outsiders, but it certainly is your job to judge those inside the church who are sinning in these ways. God will judge those on the outside; but as the Scriptures say, 'You must remove the evil person from among you'." (1 Cor. 5.12-13).
The Bible consistently tells us not to criticize people by gossiping or making rash judgments. At the same time, however, we are to judge and deal with sin that can hurt others. Paul's instructions should not be used to handle trivial matters or to take revenge; nor should they be applied to individual problems between believers. These verses are instructions for dealing with open sin in the church by a person who claims to be a Christian and yet who sins without remorse. The church is to confront and discipline such a person in love.
"The hands of the witnesses shall be first upon him to put him to death, and afterward the hands of all the people. So thou shalt put the evil away from among you" (Deut. 17.7).
A person was not put to death on the testimony of only one witness. On the witness of two or three, a person could be condemned and then sentenced to death for stoning. The condemned person was taken outside the city gates, and the witnesses were the first to throw heavy stones down on him or her. Bystandards would then pelt the dying person with stones. This system would "purge all evil" by putting the idolater to death. At the same time, it protected the rights of accused persons two ways. First, by requiring several witnesses, it prevented any angry individual from giving false testimony. Second, by requiring the accusers to throw the first stones, it made them think twice about accusing unjustly. They were responsible to finish what they had started.
"So be careful not to jump to conclusions before the Lord returns as to whether or not someone is faithful" (1 Cor. 4.5). It is tempting to judge fellow Christians, evaluating whether or not they are good followers of Christ, and to try to determine if one is the tare unsaved operating in the outward appearance of the kingdom of heaven. But only God knows a person's heart, and he is the only one that has a right to judge. But, Paul's writing to the Corinthians should also be a warning to us. We are to confront those who are sinning (1 Cor. 5.12-13), but we should not judge who is a better servant for Christ. When you judge someone, you invariably consider yourself better - and that is arrogant.
The church must discipline flagrant sin amongst its members. Such sins left unchecked can polarize and paralyze the church. The correction, however, should never be vengeful. Instead, it should be given to help bring about a cure. The Corinthian believers refused to deal with a specific sin in the church: A man having an affair with his stepmother. The church was ignoring the situation, and Paul was saying that it had a responsibility to maintain the standards of morality found in God's commandments. God tells us not to judge others. But he also tells us not to tolerate flagrant sin because allowing such sin to go undisciplined will have dangerous effects on other believers: "How terrible that you should boast about your spirituality [and authority], and yet you let this sort of thing go on. Don't you realize that if even one person is allowed to go on sinning, soon all will be affected? Remove this wicked person from among you so you can stay pure." (1 Cor. 5.6-7).