This was Zack Snyder's decision for Justice League. He was apparently perfectly happy with having magical flying superheroes fighting intergalactic insects led by a evil brillo pad, but thought that the idea of people talking underwater was silly and illogical.
I invented that because I don’t like talking underwater. It makes no sense. I believe Atlanteans’ underwater language would be a series of clicks and squeaks, never got a chance to work it out.
Zack Snyder - Via Twitter
James Wan, on the other hand, had a different thought and decided that his Aquaman characters would have their lungs filled with water, allowing them to speak underwater. No reason was given for this change of direction, other than it purely being a directorial choice.
"Just from a practical standpoint, people ask me, when they talk, 'Is it bubbles that come out of their mouth?'" Wan explained. "No, 'cause there's no air in your lungs, so there wouldn't be any bubbles, right? Because you don't do that, right? And, so, then, in that sequence, where you saw Mera open up this air pocket to suck Orm away from Arthur, help him out, now, when he's breathing, the first thing he does is he using the air pockets, where he could get out all of the water that's in his lungs."
'Aquaman': Why Atlanteans Vomit When Out of Water