When an individual enlists in the military, or takes the officer's oath in the military, he or she swears to uphold and defend the Constitution of the United States.
Now, it's no real secret that military members enjoy abridged Constitutional rights. For example, individuals living in barracks are subject to warrantless searches without probable cause. Additionally, military members are often given gag orders by the Commanding Officers or base commanders, especially regarding controversial topics.
However, it's paramount to note that the Military officially endorses the concept of free exercise of religion. When I was in basic training, we had a lesson on how to wed religious practices with the government activity (military being a federal entity, and all), and how having chaplains available jives with the concept of free exercise and does not conflict with the concept of establishment of religion.
Unfortunately, not everyone seems to understand that Free Exercise, even in the military, applies to even those who do not share their beliefs, and that this extends to those who believe in no Deity. The writers at Americans United report on a suit filed against an Army Major who allegedly threatened a soldier who followed procedure to convene a meeting of Atheists and non-believers. According to the complaint, the Major threatened UCMJ action against the attendees and threatened to prevent the specialist (e-4, just above a private, not yet an NCO) from re-enlisting.
Now, of course there are going to be people who support the alleged actions of this Army Major. We know this, because even in a country where people are free to choose whatever religion they wish to follow, people insist that some religions are wrong, or that they deserve to be discriminated against. Some people have suggested that Muslims should not be allowed to hold public office, such as Representative Keith Ellison from Minnesota. I've heard it argued that because the Koran does not allow a person to swear to anything else, that his oath was not to be trusted, and thus, as a result of his Religious Faith, he should not be allowed to hold office - his religion failed the test, as it were. This despite the fact that the Constitution is quite clear in stating that No Religious Test shall be used in determining eligibility to hold public office (U.S. Const., Art. VI).
It's bad enough that things like this happens to public officials - to be derided for their faith. But it's even more egregious when such attempts to deny a person their right to believe, or in the above case to not believe, occur against those who are fighting for our nation, and for the freedom of another. And when it's a Commissioned Officer threatening a lower enlisted individual, that just tops it off.