Well I've known a good number of criminals, in relaity they are a broad bunch and you have to realize this, and what simple things liek gaming can do for them.
Broadly speaking, inmates come in 4 varieities at least in the UK (I can't speak for US gangs and similar extremes across the globe):
1) Dumb. Sorry to be blunt but many of them are sub-normal IQs and often have other issues. so teenage hormones, bad upbringing and lack of ability to grasp what outcomes actually MEAN or do to others, ends in them making poor choices indeed.
consider peer pressure, anger etc on your own self at that age, and think aboout it
Thus, a structured system, with fun, a goal they cxn grasp, adding maths and literature helps.
Most have apalling reading, writing and maths skills. If you make them things they want to learn, this is a big help. For some kids, if they try to learn, they are attacked by their peers as that is not "macho" or whatever which helps lead to their criminality.
So, D&D helps.
2) Mentally ill. Alas about 1/3rd of those in UK jails need to be in mental facilities, but idiotic political stuff (which I'll avoid as per mod wish) ends up in them being dumped in jails.
these people are a wide variety. they can be decent, intelligent folk who've had severe issues they cannot help. roleplay, intelligent fun can be good for some of 'em but they are such a wide group there's no easy median, some are just too screwed up.
3) Crimes of passion. Anyone can blow a fuse, a fight over some contention leads to a death instead of sore heads for example.
When these are, as often, unqiue crimes for that person, something out of character, they can be the ones most likely to not re-offend.
D&D is therefor a normal pass time that lets them socially bond and enjoy things.
Now whether folk who advocate brutality to prisoners like it or not, if prisoners are to be released they must become "decent memebers of society again", and social skills, friendship etc that games create is part of that.
Do folk realze that anyone who thinks prison isn't a detterent and thus commits crimes, is an idiot/screwball? doing time is NEVER "easy", jeesh.
4) Evil. Although psychopathy is a mental illness they must be put in this catageory, as they have NO redeeming features at all and actively go out of their way to cause harm.
Sane people who do serious malign things for profit or pleasure are irredeemable (at least by an outside agent, rarely they can change from some event, trauma or realization).
These kind need welded into a cell and banned from all contact with other human beings, forever. They are manipulative and incredibly dangerous. So you should nto let them play games with others.