A story I am working on contains a species, that evolved as tree dwellers on a planet mostly covered by giant forests, but are now spacefareing. This species tries to avoid fire due to their home planet being almost entirely thick forest,with more oxygen in the atmosphere than Earth, leading to large fires being extremely destructive. They did develop metal working and limited explosives, but The first gunpowder based weapons were basically flame throwers, so I do not think that they would have made this development, nor the subsequent developments that led to firearms as we know them. I am trying to figure out an alternative to firearms that they could have developed in their place.
Spacefaring implies advanced rocketry. Rocketry implies a long history of tinkering with different propellants. If this race is not particularly peaceful, they would have a lot of military applications for combustive propellants before they achieve their first space flight.
They may not discover black powder the first, and weapons development may take a different route for them, but they would definitely have a full variety of firearms at 21st century human tech level.
An aquatic species would be unlikely to develop firearms. Their notion of chemistry would likely evolve from much different needs. They could conceivably develop biological based knowledge sooner than humans did since the sea, like the rainforest is a fast bio reactor generating new genotypes at fantastic rates.
If they did need thermal energy to smelt metals — that is if there ships were metal based and not organic — they’d need to develop self-oxidizing fuels to generate heat, but they would tend to be slow burning and not useful for as propellants for slug throwers.
Given the relative high viscosity of water and the low visibility firearms wouldn’t be all that more useful than spearguns and domesticated sharks, barracudas, and moray eels.
I am assuming a few things here,
As you said that the species became spacefaring, but you didn't explicitly mention that they developed the advance rocketry on their own.
Maybe some advanced spacefaring aliens came along their planet, saw them as allies and gave them the technology and made them a part of their covenant.
I cannot remember the title of the story, but there was a story about a spaceship landing in the USA. We surrounded it with troops and when the doors opened out came soldiers with swords and spears on horses. The battle was short and one sided. The plot twist was that space travel involved a primitive technology that we never discovered, but most other races discovered early in their history. The galaxy was filled with race using primitive technology to travel between the stars.