Transhumanity may seem spoiled for choice when it comes to criminal justice, with the innovations such as psychosurgery, minders, and freemen, 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 an intense taboo. Post-singularity technology makes secure physical imprisonment difficult, and on most habitats it is seen as a waste of resources anyway. Egos could be paused and stored as a form of imprisonment, but this seems like dodging the issue by palming off to an unknown future.
The most used forms of punishment are restitution requirements for resleeving and/or material damage, and exile. Societies that use this option don't make many friends, however, 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.