Only two states allow felons to vote while incarcerated: http://www.ncsl.org/research/elections-and-campaigns/felon-v...
I know Maine allows it, and even encourages it. I actually started a campaign for State Senate at one point. As I got closer to election, I learned more about the system and decided I couldn't participate in that. So, I never turned in all the signatures and didn't run.
But, thanks for the correction. For some reason, I'd assumed the rest of the States allowed it. I understand that, in Maine, some candidates have even campaigned, in person, in the prisons. Notably, we don't actually have a lot of prisoners or very dangerous prisons.