People do not entirely give up their constitutional and human rights when they are incarcerated. When the State places people under its own custody, it becomes responsible for ensuring that their rights are respected. Prisoners have limited but important rights to send and receive mail and reading material; to access the courts; to practice their sincerely held religious beliefs; to fair notice and an opportunity to be heard during disciplinary proceedings; to health care, a safe environment, and exercise; to marry and divorce; and to be free from cruel and unusual punishment, including assault from guards and other prisoners, among other things. In general, the State may only limit these rights when it has a “legitimate penological interest” to do so.
This is from Delaware’s ACLU website.