If a judge is inclined to acquit a defendant, he may not change his vote to guilty just because others are doing so. It doesn’t matter if it’s because the majority are voting guilty or because greater scholars think the defendant is guilty; if this particular judge thinks the defendant is innocent, he may not defer to his peers. He has to analyze the facts of the case himself and reach his own conclusion.
This would be an easy thing for a judge to justify. Judge Reuven might think, “Judge Shimon is a great man and surely knows what he’s talking about. It’s good enough for me to follow him.” But it’s not. Judge Reuven made it to the courts on his own merits and he now has to use his skills to do his job; if God had wanted Judge Shimon to have two votes, the Torah would have allowed him to hold two seats!
Included in this mitzvah is that a person who argues the merits of the defendant in order to acquit him cannot then turn around and argue to convict. Many other details of court cases are learned from this. For example, there is a right to a presumption of innocence for the defendant; if all the judges start with a presumption of guilt, it’s declared a mistrial. Also, the rule is that a court starts with the junior judges and works its way up to the senior judges so that the senior judges’ opinions should not unduly sway the junior members’ opinions.
The reason for this mitzvah is that, if every judge defers to another’s opinion, it’s possible to reach the point where the entire court simply blindly follows the opinion of its greatest member. This isn’t what God wants. If it were, He would have put a defendant’s fate in the hands of a single judge.
This mitzvah only applies to the courts. In the Talmud, it is discussed throughout the fourth chapter of tractate Sanhedrin, and specifically on page 36a. It is codified in the Mishneh Torah in Hilchos Sanhedrin chapter 10. It is #283 of the 365 negative mitzvos in the Rambam’s Sefer HaMitzvos.