The man, Cody Duane Scott Herrera, pleaded guilty to rape — the incident involved a 14-year-old girl when he was 17 — and received a 5 to 15 year sentence, but he can get probation instead of prison if he completes "intensive programming and education." However, he must then adhere to a condition:
“If you’re ever on probation with this court, a condition of that will be you will not have sexual relations with anyone except who you’re married to, if you’re married,” [Judge Randy] Stoker told him....Loebs also observes that — as far as the law on the books — fornication is a crime in Idaho. Obviously, it's not enforced, and if it were, it would, I presume, be struck down as a violation of substantive due process (the right of privacy). But does that make the condition on probation a violation of his constitutional rights? WaPo found a lawprof to say so:
[Twin Falls County Prosecutor Grant] Loebs said probation is intended to restrict certain behaviors related to the crime. For instance, for someone convicted and sentenced for drunken driving, the terms of probation may stipulate no drugs or alcohol....
“We don’t just put sex offenders on probation and then not care what they do,” Loebs told The Washington Post. He emphasized that probation is an agreement and, assuming that offer is made, Herrera can reject it.
“I think it infringes on his constitutional rights,” Shaakirrah R. Sanders, an associate professor at the University of Idaho College of Law, told the Times-News about the proposed celibacy.* “I think if he appealed,” Sanders said, “he would win.”Herrera does have the option of refusing probation on going to prison for 5 to 15 years, and, as Loebs says: "a judge’s purpose is to keep them from committing another offense. A judge has [a] right to order things to keep him from doing that."
Is no sex until marriage (for a person convicted of rape) like no drugs/alcohol (for a person convicted of a DUI)? There are (at least) 2 dimensions to this question: 1. The causal connection between the forbidden activity and the criminal offense, and 2. The centrality of these activities to fundamental human dignity and autonomy.
* Celibacy is exactly the wrong word. I'm not usually a stickler about the celibacy/chastity distinction, but the judge's condition goes right to the traditional distinction between the words: Celibacy is the principle of abstaining from marriage (and sex too, of course). Herrera isn't forbidden to marry. (And if he were, the judge's condition would run into more serious constitutional problems, because the Supreme Court has applied the right to marry even to prisoners.)
ADDED: Some of the commenters at the link (to The Washington Post) are criticizing the judge for not seeing (or not believing) that rape can happen within marriage.