Is adultery still illegal under military law? It depends a lot on the situation. Technically, Article 134 of the Uniform Code of Military Justice makes adultery a criminal act -- but only when all the elements are met to prove the case. That can be a lot harder to achieve than some spurned spouses may like to hear.
In order to prove adultery under the UCMJ, you have to prove:
-- The accused service member wrongfully had sexual intercourse with a specific person.
-- The accused service member was still legally married to someone else at the time.
-- That, under the circumstances, the conduct of the accused service member was sufficient "to the prejudice of good order and discipline in the armed forces" or bad enough to bring discredit to the military itself.
The second element is usually the only one that's truly easy to prove. A service member is either still legally married or not on any given date.
The first element may be much harder to prove. If the service member or other party to the affair ended up pregnant, that could lend conclusive proof, but otherwise you are going to have to rely on at least one of the two parties involved to confess, try to get photographic evidence or hope for a witness.
The third element is where most cases fail to move forward. In essence, it means that the military has to show that the affair somehow had a direct, negative effect on the military.
That's easier to do if the affair included members of different ranks, both parties were in the military or a military spouse was involved because all of those actions can lead to a breakdown in a unit's cohesiveness, the ability of a unit to function as a team or the morale of another service member. If the affair involved a service person and someone who wasn't connected to the military in any way, a negative effect on the military may be very hard to prove.
In addition to just those factors, military commanders are supposed to consider several different factors when looking at the third element. That includes whether or not there was a legal separation in place at the time of the alleged affair and the rank of the individuals involved.
If you believe that that your spouse has committed adultery and want to present evidence of it at your divorce hearing, an attorney experienced in military divorces can provide more information.
Source: Military.com, "Legal Separation, Adultery and the UCMJ," Christopher M Kenny, accessed Jan. 31, 2017