There are several ethical and legal issues related to the question of freedom of religion for inmates. One issue is whether deprivation of religious freedoms constitute "cruel and unusual" punishment. Another issue would be whether determining or restricting inmate religion would violate the Establishment clause in the Constitution. Another issue is the lengths to which a prison must go to accommodate religious freedom.
For example, imagine that a pious Muslim is on death row. His religion obligates him to make a pilgrimage to Mecca before he dies, but he has not done so. Does preventing him from going on that pilgrimage infringe on his religious freedom?
Another dilemma comes in the degree to which prisons are obligated to facilitate dietary commandments of various religions, including a lacto-vegetarian diet for Buddhists, kosher food for Orthodox Jews, and halal food for Muslims. Similarly, must the prison provide peyote and sweat lodges for Native Americans?
Although most prisons have defined policies for major religions, smaller religions, or cults, especially those that are devoted to practices that the larger society might find hateful or illegal involve greater ethical dilemmas. Imagine a follower of the god Moloch, an ancient Carthaginian deity who required human sacrifices. Most people would, I think, argue that the greater good of preventing murder would trump the right of a follower of Moloch to perform his annual human sacrifice (inside or outside of prison).