For those people who have long sentences, they are outside of the 'normal' system, don't pay tax, don't have access to the normal public services etc so should not be able to vote.
The difficulty is when people have short term sentences - anywhere from a month to 4 years - as these people will potentially be tax payers and be part of normal society at some point during an elected governments term. Therefore (much as I don't like it), I think that these people should have a right to vote.