The District Court had held, ridiciulously, that Warsoldier had not been denied any religious exercise because he had not been physically forced to cut his hair, but had just been denied a tremendous amount of privileges. Obviously, the Ninth Circuit held, this flies in the face of Sherbert v. Verner and the idea that punishment that coerce an adherent to forgo religious exercise is a substantial burden.
The prison rule being a substantial burden, the government had to then prove that it advanced a compelling state interest and was narrowly tailored. The Ninth Circuit didn't buy any of the arguments such as disease control or heightened security from not being able to hide things in the hair. While they in the abstract are sufficiently compelling, the hair length rule was not narrowly tailored.
To be sure, the court noted several times that this is a minimum security prison and distinguished a number of cases that would push them the other way based on this distinction. But the Ninth Circuit would require the prison authorities to have "actually considered and rejected the efficacy of less restrictive measures before adopting the challenged practice."
This opinion surprises me because of the sweepingly non-deferential language the Ninth Circuit used. Remember Johnson v. California (we blogged about here and here), and the arguments in Cutter (here). Deference to prison officials goes back and forth. In Johnson (5-4), the majority refused to defer, exacting strict scrutiny, when the issue was racial segregation, while Cutter was, at least it seemed from the arguments, upheld specifically because the problems of religious practices impairing prisons' ability to conduct necessary operations would be remedied by deferring. Today's opinion must be seen as strict scrutiny of the prison rules.
The race issues from Johnson, such as what you do with an inmate who has a religious belief in segregation, are resolved since these are, presumably, compelling state interests. But the health and security concerns are problematic. While I'm a fan of RLUIPA, I'm not sure how to resolve this.
 From the Ninth Circuit Opinion:
As a consequence of his refusal to cut his hair in violation of his religious beliefs, Warsoldier has been subjected to a series of punishments designed by CDC to coerce him into compliance. He has (1) been confined to his cell; (2) had additional duty hours imposed on him; (3) been reclassified into a workgroup where inmates do not receive time credits or as many privileges as others working in a higher work group; (4) lost his phone call privileges; (5) been expelled from print shop and landscaping classes; (6) been removed from his position as a member of the Executive Body for the Inmate Advisory Council; (7) been prohibited from going to the main
yard for recreation; (8) had his monthly draw at the prison store reduced from $180 to $45; and (9) been prohibited from making special purchases at the prison store.