My husband is a JAG attorney at Ft. Carson. This advice comes from him:
1) Have your daughter make an appointment at the legal assistance office on post. It is FREE and CONFIDENTIAL. She will speak with an attorney that can help her set up a family care plan & deal with the legal aspects of getting temporary custody assigned to you (not her soon to be ex) while she is deployed. The attorney can also walk her through divorce paperwork and process.
2) Colorado has very recently (only 1 case so far) started recognizing the family care plan (a written document she files with the army when she deploys that says who gets her child while she's away) as a custody document. If her ex decides he wants the baby while she is away, he can take her to court over it, but the new precedent (from that one case) says he probably won't win. If she has 100% custody of the child, that document (her wishes) will remain in effect. Again, a JAG attorney at the legal assistance office can help her set this up so it becomes nearly fool-proof.
3) The legal assistance office can also help her file additional paperwork (on top of the family care plan--separate from the army) that gives you (and not the child's father) custody for a specific period of time. This is double insurance, but easy enough to do.
If the divorce will not be final until AFTER she deploys, that is a whole other deal, but the attorneys on post can help with that situation too...it's just a bit trickier.
Finally, even though her spouse is a civillian, he is allowed to get free council on post as well, but if your daughter goes in first for divorce-related advice, the office will turn away her husband. He is still allowed free military legal advice, he will just have to go to one of the other bases in town. The office she goes to will not represent both of them at the same time due to conflict of interest.
Hope this helps. If you have any more specific questions, feel free to send them my way. My hubby is happy to answer questions.
PS- My husband read the other responses and said they are WRONG, WRONG, WRONG!! If your daughter is divorced before she deploys and has 100% court-awarded custody, she gets to decide who takes care of her child. Custody does not automatically go to the father or get randomly decided by a judge. PLEASE have her see a lawyer on post.
One of the responses was correct in that a military lawyer can't represnt her in her divorce (she has to file with the state), but he/she can help her fill out all paperwork and walk her step by step through the process and give lots of advice specific to her situation.