In trying to answer this question we should perhaps accept that in the first instance prison is a method used by our society to punish a wrongdoer. Whether this punishment or indeed any kind of punishment is an effective way of dealing with wrongdoing is another debate.
We should also acknowledge that a punishment may give some comfort to victims of crime and to their relatives, though this may not be universally so.
We can be sure prison is a punishment. Just think of how it would feel to be kept in a place where you cannot live with the people you love, cannot do the simple things like take a walk in the town or in the country, go to meet the people you want to meet. On the other hand imagine what would have happened to your inner self if you had spent so much time in a prison that living there carried less threat to you than the thought of being free? Do we need to punish a prisoner more ? Should we only give them an experience of punishment and if we do what kind of person will come out when his or her sentence is over ?
It should not be considered extreme to suggest that prisoners need the right kind of nurture : being encouraged not only to respect others but also to respect themselves. This can be done by giving them dignity.
Prison should give its occupants a feeling that life is worthwhile and that in accepting their sentence - that is their loss of liberty - they are being punished enough. Opportunities should be provided to help them grow as human beings. They should have a chance to study, to work productively, and be given opportunities to feel that they have not been abandoned and that they do have a part to play in the community that all humans share, no matter what their predicament. This includes the right to vote. It is extremely worrying that our political leaders, for, one imagines, populist reasons fed by what is most base in our nature, are aghast at the notion of allowing prisoners the right to vote, to the extent that they feel physically sick just thinking about it, or even more timidly they equivocate and say, "Well yes, maybe we can allow these ones to vote, but not those."
The right to vote should be given to all prisoners. It would be the action of a civilised society. One which does not condone criminal action or leave it unpunished, but one which demonstrates the lengths it will go to ensure that the generous action is predominant over the selfish one. In the generous action may be seen the seed of rehabilitation for prisoners and hope for us all.