The U.S. Supreme Court has ruled in the Williams-Yulee v. Florida Bar case, upholding the Florida Rule which banned judicial candidates from soliciting contributions in their campaigns. Thirty states had similar rules of judicial conduct.
The full opinion can be found here.