Of course these days anyone can wear anything that they like. Whether it's acceptable or not depends on where you wear it. There are some places that are more conservative than others. A man wearing a woman's swim suit may earn some curious looks. And of course there are people out there who may react in a very nasty manner. Remember that there are men out there who think that it's okay to assault women who are wearing something deemed inappropriate.
But the big problem with a man wearing a woman's swim suit is the fit. Swim wear is designed to fit the form of the wearer. A man may find that the upper part of the suit is baggy while the bottom of the suit is too tight at the front and too saggy at the rear.