Welcome aboard, @Epicgamermoment!
It sounds like you're not necessarily trying to rule the possibility of wet navies out?
It could be that you're interested in having a water navy on one (or some) of the planets within in your unified government. This is a pretty legit creative theme: water navies make for some very compelling storytelling and worldbuilding.
The answers so far are all looking to find reasons why or why not, and they have come up with some pretty good ones. But notice that those answers are all dependent on features of your created world. There's nothing about the existence of an interstellar government, as such, that either prevents or requires waterborne military capability on the individual worlds.
In general, I think you have several key worldbuilding features that might be considered:
* The nature of interstellar travel. You didn't say exactly how the interstellar civilization travels between star systems. The most common idea is to have starships; a less common fictional means of getting around is the "stargate" idea, in which long-distance matter transmission, at FTL speeds, is reliable and capable enough to knit your interstellar government together. Note that these two suggested technologies have very different implications: A gate does not automatically imply the arrival of large armed vessels in orbit, capable of providing overwhelming military presence. (Your gate might be stationary on the surface of a planet; or it might be quite small in aperture, suitable only for passage of individuals, or small cargo carriers.) And even if you are using starships, there are plenty of possible tweaks you can do with the ship technology. Your starships might be quite small, and/or expensive to operate. Your starships might be, for engineering reasons, too fragile to be combatants themselves. Etc.
* What causes a need for military forces in the first place? This is vaguely alluded to in your question: "you don’t really worry about countries on your own planet attacking you". 898
Still, this is a big deal. Who does fight in your multistellar state? Why? What do they fight about? You specifically seem to doubt that there will be multiple "countries" on a given planet -- but why? How much political authority does the central power have? It could be reasonably weak, and still hold together. And then there's the question of whether a nation-state is the only entity capable of organized violence. @Ash raises this explicitly, and well, in their answer, but @Mary, @Mon, and @FluidCode all address the issue, at least implicitly. After all, would the Fremen in Dune be considered a "country"? :-)
* What's the nature of military equipment? The key advantages of water travel are that you don't have to build roads or rails, and that it's cheap to move very heavy things (as <PERSON> says in a comment above, "Economics rules"). So maybe water transport is an excellent option on at least some of the planets. How do they project power in your civilization? Big heavy missiles? Attack aircraft squadrons? Massive ray-gun emplacements, so big that they must be emplaced on solid land or on large seagoing platforms? Or... (going back to Dune again) knives and swords?
...Not trying to smother you here! More like, hoping to inspire you. Worldbuilding is a whole lot of fun. Speculative exploration of various aspects of the world you're creating can lead you down some very creative paths.
So, the general Worldbuilding answer to your question is, If you want water navies you can have them. It's your world to build. 537