If you join the Navy - I can't speak for the Army
Detailers will do their VERY best to place you in the same geographic area. But you will never be in the same command.
BUT, with 6-7 month deployments on sea duty every 1.5-2 years, you may not see much of each other. You will also be required to complete a family action plan, basically what you're going to do to care for your children if neither of you are around. In 4-5 years on a TYPICAL rotation, you'll both go to shore duty and again, the detailers will try to place you in the same area.
Be prepared to spend lots of time apart.