If someone is in prison for a short time, even long term (anything that's not for life) will eventually live outside the walls of prison and will have to live with whatever actions taken by the legislators at that time. Denying them the right to choose who will make the rules that they will have to live by after leaving prison is inhumane for that reason.
Prisoners do have impaired judgment. They have made a significant mistake once, and with the prisoners making decisions, can we really trust that they will vote for our country's best interest? Prisoners are in jail for a reason, they broke the law. Should we really have people who went to jail as a punishment and who broke the law vote for the people who make the laws?
The main problem in prisons these days is that many prisoners are mentally disturbed, and that is often why they committed the crimes they committed and ended up in jail in the first place. They're too unbalanced to do much of anything, especially pick the future elected official from their area.
No, prisoners should not retain the right to vote. While serving their debt to society for their crime, they should not be afforded a say in the decisions that impact the nation. Their punishment for their crime includes being incarcerated, which takes them out of society as a participant. Why, then, should we allow them to continue to influence what happens to the rest of society?