When you go to prison after a court sentences you for a criminal conviction, you lose some rights. Most notably, you lose your right to freedom. However, you still retain some of the rights you have as an American citizen.
The ACLU explains that the constitution provides you with various rights the government cannot take away from you even if you are living within the prison system.
Religious rights
Your right to religious freedom does not end with your conviction and sentencing. Even in prison, you have the right to follow your religious beliefs and receive accommodations for those beliefs within reason. For example, if you need to eat a specific diet, the prison should be able to easily accommodate that. You also have the right to attend services or observe certain customs.
Safety rights
You also maintain your right to be safe and secure in your own person. While officers can conduct searches and other things, they cannot put your safety at risk through the use of unreasonable and excessive force. You also have the right to expect the prison will protect you against violence from other inmates.
Special rights
You may also have certain special circumstances where you will have specific rights. For example, if you are pregnant, you have the right to seek an abortion and to get proper medical care during and after your pregnancy.
If you have a disability, the prison must accommodate you. You have the right to programs and other activities like any other inmate. You also have the right to be in an accessible area and modifications.
If you are a transgender individual, you also have the right to fair treatment and recognition of your appropriate gender, including the right to gender-appropriate clothing. You have the right to individual housing to keep you safe, but do note the prison cannot place you in solitary confinement for more than 30 days. You also have rights to programs and other activities that every other inmate has.