Although women are not allowed to serve on U.S. Navy submarines, there are twelve submarine qualified female officers in the navy. That is, they have taken all the training required for someone to serve on a submarine. There is a lot more training on the boat before you become part of a crew. These women are technical specialists, and do serve for short periods on submarines, sharing a two person stateroom. Other navies (Australia, Canada, Denmark, Sweden, Spain and Norway) allow women to serve on subs, but not all of these countries have had many, if any, women actually volunteer for the service.
The U.S. Navy has a unique situation, however, mainly the length of the cruises (up to three months at a time for missile subs and a month or so for attack boats). The nations that already allow women on subs, have non-nuclear boats that spend far less time at sea, each time they go out. The women on these sub crews have got used to the lack of privacy, and both genders have adapted, as has been the case with mixed crews on surface warships. But the wives of American submariners have been openly hostile to the idea of mixed male/female crews. What the wives worry about is, well, sex. They know that this takes place on surface ships with mixed crews, and it has caused a few marriages to break up. Service on subs is even more claustrophobic and stressful. And there are far fewer places, compared to surface ships, for a couple to have some clandestine sex. But this sexual activity, even though banned on all USN warships, does happen.
There's also the problem of berthing, although other navies have simply put a curtain or two up to separate the male and female berthing. The officers and senior NCOs have shared rooms, and if women are allowed to serve on American subs, it will probably be women officers at first. Not a lot of men are willing to go through all the training and tests to qualify for a job as an enlisted sailor on a nuclear sub, and probably fewer women are interested.