I mean… we need to start with “define safe”. If you mean, “is it safe to have something potentially dangerous onboard a military ships” I would point out that there are lots of things on military ships that are either explosive, toxic, flammable, or in some delightful situations all three at once! Military ships, vehicles and people have been carrying some pretty dangerous stuff for centuries at this point, a nuclear reactor doesn’t particularly move that needle much in the scheme of things.
But I assume you’re really thinking about the risk of a ship being sunk and the nuclear reactor being breached. Well good news! That’s not really that much a problem. [See water is a REALLY good insulator against radiation](https://what-if.xkcd.com/29/). So once the ship is done sinking, all the nuclear stuff is kind of just… safely there on the bottom. Compared to (for example) the economic and environmental consequences of leaking a million gallons of oil into the ocean, a nuclear reactor is pretty mild.
But let’s think about this another way – why put something like a nuclear reactor on a carrier? Well… because it means that the carrier can go really really fast, for a really really long time, without any need to refuel! That’s pretty sweet, especially for a navy like the US Navy that plans to operate all over the globe. Nuclear reactors give ships an endurance that is only limited by the flesh and bone crew which is pretty high value.
Latest Answers