Prisoners, even though they are under legal sanction and as such deprived of their liberty, are still entitled to several rights. However, the State has the power to take away or limit some of the rights and privileges of prisoners not only for protection and security reasons; one must bear in mind that the main purpose of prison is to punish a person for doing a crime and to rehabilitate him and those purposes should always be the priority of the government.
Taking away several rights and privileges such as freedom, comfort, right to manage their property and affairs, parental authority over their children, not only teaches a lesson but it also helps the prisoner contemplate the severity of his actions. Restrictions must be enforced because everything that prison stands for would be useless and the government would fail miserably in punishing and reforming transgressors if they would feel that the environment inside a prison is just the same as the outside.
The good news for prisoners is that the most fundamental rights of a person, prisoner or not, is protected by the Constitution. They have the right to a family as well as visitation rights. Visits from families can help the prisoners look forward to something after prison. They also have the right to religion. Several prisons organize vocational and trade school courses for the prisoners. Education enables the prisoners to develop a hobby and learn something useful.
Prisoners also have right to medical care, if a prisoner is sick he has a right to ask for medical attention as soon as possible as well as adequate medicine. Prisoners always have the right to counsel as well as research. Some penitentiaries provide facilities like libraries, gym and a chapel. Prisoners may have lost their liberty but they should not lose their dignity and their right to fair and equal treatment in the eyes of the law.