Erik Voeten finds research that suggests they aren't:
Inmates housed in higher security levels are no less likely to recidivate than those housed in minimum security; if anything, our estimates suggest that harsher prison conditions lead to more post-release crime. Though small sample sizes limit the precision of our estimates, we argue that our findings may have important implications for prison policy, and that our methodology is likely to be applicable beyond the particular context we study.