A military member, who does not claim Maryland as his/her state of residence, is not required to obtain a Maryland driver's license or register a car (in their name alone) in Maryland. This is based on the protections of the Soldiers and Sailors Civil Relief Act (Federal Law). However, they must maintain a valid driver's license and registration in some state or D.C.
If a military member's spouse or family member accompanies them to Maryland, and they are likely to reside in Maryland for more than 1 year, Maryland law requires them to get Maryland licenses. Spouses are supposed to get a Maryland driver's license if they work in the state.
To obtain a MD driver's license, you must appear in person with your current license, SSN, proof of insurance, and original or certified copy of your birth certificate.