A refusal to wear the prescribed military uniform for religious reasons can be a defense, but it is an extremely difficult one to win and requires a specific legal process. The defense is based on the Religious Freedom Restoration Act (RFRA), which requires the government to not substantially burden a person’s exercise of religion unless it can prove a compelling government interest and that it is using the least restrictive means to achieve that interest.
However, the military is given great deference by the courts regarding its interest in uniformity, discipline, and readiness. A simple refusal to wear the uniform is a direct violation of a lawful order under Article 92, UCMJ. To have a chance at a successful defense, the service member must have first submitted a formal request for a religious accommodation to the command, asking for a waiver to allow them to wear a specific religious item or to be exempt from a specific grooming standard.
If the command denies this formal request, the service member can then appeal that denial. A military attorney would argue that the command’s denial of the accommodation places a substantial burden on their client’s religious freedom and that the command does not have a compelling interest in denying it. It is only after exhausting this administrative process that a refusal to obey the order could potentially be defended in court under RFRA. A simple, on-the-spot refusal without a prior request for accommodation will almost certainly fail as a defense.