This issue was raised in the United States Supreme Court case Williams v. Pennsylvania, 579 U.S. ___ (2016) in which a state supreme court chief justice who had formerly prosecuted the case later presided over it on appeal.
The case involved an appeal by state prosecutors, seeking to reverse the lower court’s grant of a writ of habeas corpus following conviction for murder and robbery and a sentence of death. By the time the appeal was heard, one of the prosecutors involved in the original decision to seek the death penalty had become chief justice of the state supreme court.
The Supreme Court eventually decided that the state chief justice was to directly and personally involved in the case to remain sufficiently impartial, saying that the likelihood of bias by that judge was “too high to be constitutionally tolerable.”
The Supreme Court further ruled that recusal was required for any judge in this situation, not just in the specific circumstances of that specific case. The Court’s ruling that someone cannot serve as “both an accuser and an adjudicator” still stands, and the case law applies to all 50 states, including Utah.
The analysis is different if a former prosecutor has been appointed to the bench and is then assigned a new case involving a defendant who was previously charged in a different case that also involved the same former prosecutor (now judge). Such a situation would require analysis of the specific facts of the case and would not necessarily result in automatic recusal of the judge.
If the judge presiding over your case formerly served as prosecutor in the same case, law requires that the judge be recused from your case. Speak with your attorney so that they can file the appropriate motions, to ensure that you get the fair procedures trial that the Constitution guarantees to you.