At common law, judicial immunity does prevent judges from being charged with crimes committed while acting as a judge, as well as protecting them from civil lawsuits. But as observed in other answers, American judges are occasionally convicted of criminal offences as a result of their conduct on the bench. When judicial immunity has been raised, courts have generally found that these judges' criminal offences were not 'judicial acts' and therefore not subject to immunity. Although criminal judicial immunity appears to be theoretically available in the United States, it is unclear that it has any practical effect.
Qualification of the accepted answer
The accepted answer states that "footnote 1 of Mireles specifically says criminal liability isn't blocked by judicial immunity." In fact, the case cited in that footnote implicitly accepts that judicial immunity can apply to criminal liability – it's just not an absolute immunity. The footnote reads:
The Court, however, has recognized that a judge is not absolutely immune from criminal liability: Ex Parte Virginia, 100 U.S. 339, 348–349 (1880) ...
In Ex Parte Virginia, the Supreme Court found that a county court judge was not entitled to judicial immunity in respect of an indictment which accused him of excluding African-Americans from a jury on racial grounds. However, the Court reached this decision by finding that the judge was not 'performing a judicial act' in selecting the jury:
[I]t was assumed that Judge Cole, in selecting the jury as he did, was performing a judicial act. This assumption cannot be admitted. Whether the act done by him was judicial or not is to be determined by its character, and not by the character of the agent. Whether he was a county judge or not is of no importance. The duty of selecting jurors might as well have been committed to a private person as to one holding the office of a judge .. In such cases, it surely is not a judicial act, in any such sense as is contended for here. It is merely a ministerial act ...
Alternatively, the Court held that the judge was not acting judicially because he went beyond the State law which granted him the power to select the jury:
But if the selection of jurors could be considered in any case a judicial act, can the act charged against the petitioner be considered such when he acted outside of his authority and in direct violation of the spirit of the State statute? That statute gave him no authority, when selecting jurors, from whom a panel might be drawn for a circuit court, to exclude all colored men merely because they were colored. Such an exclusion was not left within the limits of his discretion.
Origin of judicial immunity in the United States
Judicial immunity is an old common law principle which is often traced back to Floyd v Barker (1608) 2 Coke's Reports 23; 77 ER 1305. In that case, Lord Coke held:
It was resolved that the said Barker who was Judge of assise, and gave judgment upon the verdict of death ... and the Sheriff who did execute him according to the said judgment ... were not to be drawn in question in the Star-chamber, for any conspiracy ... the Judge ... being Judge by commission and of record, and sworn to do justice, cannot be charged for conspiracy, for that which he did openly in court as Judge ...
The Supreme Court seemed to adopt the principle in Bradley v. Fisher, 80 U.S. 335 (1871). However, this was a civil case and the Court did not explicitly endorse the application of judicial immunity to criminal charges:
The principle, therefore, which exempts judges of courts of superior or general authority from liability in a civil action for acts done by them in the exercise of their judicial functions, obtains in all countries where there is any well ordered system of jurisprudence ... Nor can this exemption of the judges from civil liability be affected by the motives with which their judicial acts are performed. The purity of their motives cannot in this way be the subject of judicial inquiry. This was adjudged in the case of Floyd and Barker, reported by Coke, in 1608, where it was laid down that the judges of the realm could not be drawn in question for any supposed corruption impeaching the verity of their records, except before the King himself ...
Judicial immunity for criminal liability in the modern United States
Jeffrey M. Shaman, a professor at DePaul University, wrote the following in 'Judicial Immunity from Civil and Criminal Liability' (1990) 27(1) San Diego Law Review 1:
But for one narrow exception, judicial immunity does not exempt judges from criminal liability.149 Courts have stated unequivocally that the judicial title does not render its holder immune from responsibility even when the criminal act is committed behind the shield of judicial office.150 As is the case regarding immunity from civil liability,151 immunity from criminal liability does not extend to nonjudicial acts or acts taken in the clear absence of all jurisdiction.152 Even beyond such acts, however, judicial immunity generally is not available for criminal behavior ... The one area where judges can be said to enjoy immunity from criminal liability is for malfeasance or misfeasance in the performance of judicial tasks undertaken in good faith.154
The cases cited in footnotes 149 and 150 are Ex Parte Virginia, Braatelien v. United States, 147 F.2d 888 (1945) and McFarland v. State, 109 N.W.2d 397 (1961). As explained above, in Ex Parte Virginia the judge was held not to be acting judicially. The other two cases were decided on the same basis. In Braatelien, the Court of Appeals for the Eighth Circuit said:
It is true that as a general rule a judge can not be held criminally liable for erroneous judicial acts done in good faith ... But he may be held criminally responsible when he acts fraudulently or corruptly. Judicial title does not render its holder immune to crime even when committed behind the shield of judicial office. The sufficient answer to this defense is that Braatelien was not indicted for an erroneous or wrongful judicial act. He is charged with conspiracy to defraud the United States by corruptly administering or procuring the corrupt administration of an Act of Congress. The crime charged is distinct from his official acts.
Similarly, in McFarland the Nebraska Supreme Court held:
The rule as to judicial immunity is ... that a judicial officer, when required to exercise his judgment or discretion, is not liable criminally for any error which he commits, provided he acts in good faith. However, any judicial officer who acts fraudulently or corruptly is responsible criminally, whether he acts under the law or without the law ... in this case the evidence shows that the defendant, while occupying the office of county judge ... collaborated with and acted at the direction of Rhodes. To say that such conduct was outside the realm of judicial action is to put it mildly.
So, the current position seems to be that while US judges enjoy a theoretical immunity from criminal liability for judicial acts performed in good faith, it is unlikely to operate in typical cases of judicial misconduct.
Postscript: a constitutional requirement?
Following the indictment of federal judges Otto Kerner Jr., Alcee Hastings and Harry E. Claiborne, some commentators have suggested that the Constitution may require that federal judges are immune from all criminal liability unless and until they are impeached in the Senate, on separation of powers grounds. See Hamilton W, 'Indictment of Federal Judges: Chilling Judicial Independence' (1983) 35 University of Florida Law Review 296 and Gold SW, 'Temporary Criminal Immunity for Federal Judges: A Constitutional Requirement' (1987) 53 Brooklyn Law Review 699. These articles also contain a more detailed account of the history summarised above.