If you want a divorce, the fact that you're deployed doesn't necessarily have to stop you, although it may make the process logistically more difficult. If your spouse files, however, and you're overseas, the federal government has your back. Under the terms of the Servicemembers Civil Relief Act, you can put off dealing with the divorce, at least for a while.
Servicemembers Civil Relief Act
The SCRA grants you the right to have your spouse's case stayed or delayed until a more appropriate time if she files for divorce while you're deployed. Even if she manages to have you served with divorce papers, you can then contact a lawyer stateside to alert the local court of your being on active duty. As such, you can't reasonably defend yourself in the divorce. The court can't order a final judgment while you're deployed, although it may issue temporary orders. The SCRA doesn't avoid the divorce entirely or forever; the proceedings will resume when you're able to participate. You usually only have this option if you haven't made an appearance in the case. This means you're not the spouse who filed for divorce in the first place and you haven't answered your spouse's divorce papers by filing a response.
If You Want the Divorce
If you want a divorce and can find a willing and knowledgeable attorney in the states to handle it for you, you can usually proceed. This is somewhat dependent on individual state laws, and it's usually easiest if your divorce is uncontested, meaning you and your spouse aren't in dispute over anything, such as custody or division of property. You can handle a great many details by affidavit or sworn statements and keep in touch with your attorney via email.