Description

Skeletons are unable to swim, but they can breath and sink underwater; however, they will use melee attack to attack player, instead of ranged attacking with their bow.[upcoming 1.13]

-The Minecraft Wiki, Skeleton#Attacking_the_player

This statement from the Minecraft Wiki is not true, which you will find if you place a skeleton in deep water and go into survival mode. They will shoot you. This may not sound like an issue at first, but really it is, due to the differences in how arrows travel in water. At a long enough distance, the arrows will never hit the player, instead just sinking to the bottom. Another issue is that when you swim above them they will try to shoot upwards and the arrows will fall right down into them, killing them. This issue has been around since skeletons gained the ability to walk underwater in 18w19a.

I am unsure if this is intended or not, but I do not believe that it is. While I cannot confirm if it is true, in Bedrock edition 1.5 skeletons will switch to melee attacks in the water, and it would make sense for it to be the same on both versions of the game.