Transhumanity may seem spoiled for choice when it comes to criminal justice, with innovations such as psychosurgery, minders, and freemen morphs, but ethics and politics complicates most situations.
Psychosurgery can alter many of the traits that lead to criminal behavior, and while many justice systems allow for voluntary treatment as a form of rehabilitation, involuntary editing is a powerful taboo. Post-singularity technology makes secure physical imprisonment difficult, and on most habitats it is seen as a waste of resources. Egos could be paused and stored as a form of imprisonment, but this seems like dodging the issue by palming it off to an unknown future.
The most used forms of punishment are restitution and exile. Restitution is not always enough, and societies that send their criminals to other habitats don't make many friends, and so some of the groups fond of that option have created Exile.
Exile is a simulspace server in an isolated main-belt orbit. Those whose societies no longer want them, and would otherwise have only debt, imprisonment, or editing to choose from, can volunteer to be uploaded there in lieu of other punishments. Each prisoner is given a portion of Exile's processing cycles and loaded into a simulspace under their sole control, sufficient for satisfying realism. Prisoners can link their simulations to socialize, try create their perfect life, or request therapy and/or psychosurgery for rehabilitation and eventual release.