Using Background, Classes, and Ability Checks
As DM you get to decide if the players "automatically know" or if they have to learn things like this. This falls under the matter of DM style.
What is basic knowledge?
Since the characters grew up into their late teens/early 20's (if human) in this world and learned all kinds of things while growing up and learning a profession/class, you may ask yourself why anyone who is of the martial class would not know this?
Further that point, anything in the PHB can be considered as things that the characters will have learned while growing up / being trained. While the character sheet is a tabula rasa the characters themselves are not. You (the DM) can decide that they automatically know this kind of thing since it is in the PHB.
If you want to make your players work for this ...
Backgrounds and Classes
A way to assess this kind of knowledge is to look at the Classes, Professions, and backgrounds that your characters have, as well as their Skills.
Is there a Sailor, Folk Hero or Outlander (the last two have the Survival Skill) or a Soldier in your group? (Hmm, per your edit, no Sailor, but we'll press on).
Survival includes living off the land which would include getting food from water, or underwater. That's a way for a character to already know what weapons do and don't work best on creatures in the water. You could offer advantage on an intelligence check, or just say "you remember this from" or "you learned this from" that part of your background if you choose to offer that advice rather than make the players work for it.
Martial Classes (why wouldn't they know?) The general case for a Fighter knowing what weapons work best underwater seems pretty basic knowledge for someone whose profession is just that: combat.
Is there a Fighter in the group? That class/profession would tend to know details like this as part of their training. A Fighter would know this kind of detail about underwater fighting ... and it's unlikely that a Barbarian, Ranger or Paladin would not know.
Ability Check
The ability score Intelligence includes memory and reasoning in its description.
Intelligence measures mental acuity, accuracy of recall, and the ability to reason. (Basic Rules p. 61)
Of the ability checks based on Intelligence (Arcana History Investigation Nature
Religion) Investigation may be what you need, or just a generic "Intelligence" ability check.
Other Intelligence Checks. The DM might call for an Intelligence check
when you try to accomplish tasks like the following: {snip}
• Recall lore about a craft or trade {or in this case lore about underwater combat}.
The point on weapons and underwater fighting could come easily up in a conversation with whomever cast the spell, in terms of what weapons work best underwater. (Not using a game mechanics term, but some "advice from Trido the mage...")