My brain was swimming on the car ride to work, and I had a pile of ideas about how I have to vary from normal Science Fiction/Drama tropes to fit the peculiar setting my characters exist in.
Here on Earth we take for granted that when someone does something wrong, they need to pay a fine and/or go to jail. Fines are simple, write a check or workout a payment scheme with the court. Extended jail time is a modern replacement for Corporal punishment. It lets the State have power over people, without breaking out branding irons, whips, and pillories. Making someone "rot in jail" is generally punitive.
On a spacecraft, there aren't a heck of a lot of extra staff. Either to be removed from the workforce OR to guard those who were. While there will undoubtedly be infractions and detainments, most efforts will be to make the victims whole, demonstrate the contrition of the guilty, and take means to prevent a future occurrence.
For most cases, a simple brush with the law and a threat of further "therapeutic" measures is enough to set the guilty party straight. Some individuals are a little slow on the uptake. Others have more systemic issues, be them social or psychological.
My theory is that such a society would threat criminality as a mental health issue. You have the same basic issue: can someone control their own behavior, and if not, do they represent a threat to themselves or other people? If they do something compulsively, but the effect is relatively harmless (at least to others), well that's the human condition. If their acts damage other people, that's where the state interviens.
It wouldn't matter if we are talking about a killer caught in the act, or a demential patient who tried to slay demons who were hiding in an electrical cabinet. The goal of the state isn't punishment. It is to protect people from the behavior of an unhinged individual. And, P.S., people are in relatively short supply.
Each of these colony ships would have a pretty robust mental health system. Most people on the ship are a random sampling of the general public. Mental health would probably be the one of several areas they a ship would have a bona fide expert on board.
Now, what if that expert, in his or her judgement, finds that someone's mental state is beyond reform? Assume we have a criminal trial to prove the facts of the case beyond a reasonable doubt. Assume the State has put forth a good effort to help the convict (or patient) to reform. And assume we are looking at someone who is a danger to other people with no possibility of getting better any time soon, and we have a limited staff to treat people who WILL get better.
I, personally, am a bit squeamish about talking about Capital punishment and Euthanasia. But getting past that sort of squeamishness, how it it be carried out? In a lot of science fiction they would thrown out an airlock. That would be a really, really bad idea. Even given the vastness of space, a body thrown off a ship at relativistic speed would contain a tremendous amount of kinetic energy. The odds of a single body being thrown out hitting another ship, a colony, or some other strategic asset are small. But if it's a practice for ships to lob random objects out if a ship in transit, the probability approaches 100%. There will probably be a blanket regulation about emitting flotsam into shipping lanes.
Also, human beings are chock full of microbes. This is not an issue in the Solar System, because odds humanity has leaked it's way across every body. But across interstellar space, there is no telling where that biological material will end up.
One approach, given the medical veneer on the criminal justice system, would be to use whatever they have on board to put sick animals to sleep. Odds are whatever they use, it would be a quiet and somber matter, albeit with several eyewitnesses just to attest that procedures were followed. Probably with a notice in the paper, but nothing like a public execution.