Muslim women are not allowed to swim at the beach where people of the opposite sex can see them swimming while a part of their `Awrah (parts of the body that must be covered) are uncovered. However, there is nothing wrong for a Muslim family to swim at an isolated place far away from men’s (of course other than her husband) eyes.
In Islam, we are warned against sins of nudity, promiscuity, and permissiveness that corrupt the soul as well as the mind. They all lead to temptations, which lead to sins, and sins eventually lead to Hellfire and eternal perdition. It is therefore imperative that, while enjoying summer at the beach, we specifically avoid areas associated with the above and find locations or times where we will be staying clear of the above completely.
Sheikh `Abdul-Majeed Subh, a prominent Azharite scholar, states: “There is nothing wrong in swimming at the beach with the family if the women cover their `Awrah and you lower your gaze. Also, this should be in an isolated area far from non-Mahram eyes.”