In a 5-4 decision, the court rejected a free-speech claim brought by a Florida judge.
"Judges are not politicians, even when they come to the bench by way of the ballot," Chief Justice
The decision marks one of the few times the high court has rejected a free-speech claim involving politics and campaigning. Roberts split from the court's four conservative justices to uphold the Florida law.
Rick Hasen, an election law expert at UC Irvine, called the ruling a surprise.
"This is a huge win for those who support reasonable limits on judicial elections. And getting Roberts on this side of the issue is surprising, welcome and momentous," he said.
In the last decade, critics of judicial elections, including retired Justice Sandra Day O'Connor, have argued that the public's confidence in judges is being undercut by big-money campaigns. Even worse, these critics say, is having judges personally solicit contributions from people and companies who may have cases before the courts.
Until Wednesday's ruling, however, the Supreme Court had moved in the direction of allowing judges to campaign freely. In 2002, the justices struck down state bar rules that had prohibited elected judges from taking public stands on controversial issues.
In the Florida case, the justices were asked to go one step further and strike down laws or rules in 30 states that prohibit judges from personally asking for contributions for their campaigns.
California is one of 39 states that elect at least some judges, but it is not among the 30 states that tell judges they may not ask for campaign contributions.
The case arose when Lanell Williams-Yulee, a public defender from Florida, ran for a judgeship in Tampa and signed a mass-mailing letter asking for contributions ranging from $25 to $500.
The Florida Bar filed a complaint against her. After a hearing, she was reprimanded and required to pay a fine of $1,860.
The Supreme Court agreed to hear her appeal based on the 1st Amendment. Wednesday's ruling in Williams-Yulee vs. Florida Bar upholds the punishment.
Roberts, who cast a key vote in 2010 in the Citizens United decision, which allowed unlimited spending by corporations and unions in election campaigns, said states may enforce different rules for judges.
"The desirability of judicial elections is a question that has sparked disagreement for more than 200 years," he said. "It is not our place to resolve this enduring debate."
"Judicial candidates have a First Amendment right to speak in support of their campaigns. States have a compelling interest in preserving public confidence in their judiciaries. When the state adopts a narrowly tailored restriction like the one at issue here, those principles do not conflict. A state's decision to elect judges does not compel it to compromise public confidence in their integrity."
Justices Ruth Bader Ginsburg, Stephen G. Breyer, Sonia Sotomayor and Elena Kagan agreed.
Justices Antonin Scalia, Clarence Thomas, Anthony Kennedy and Samuel A. Alito Jr. dissented.
"Hostility to campaigning by judges entitles the people of Florida to amend their Constitution to replace judicial elections with the selection of judges by lawyers' committees," Scalia said. "It does not entitle the Florida Supreme Court to adopt, or this court to endorse, a rule of judicial conduct that abridges candidates' speech in the judicial election that the Florida Constitution prescribes."