In the parable of the sheep and goat (Matthew 25), Jesus taught people to help those, especially prisoners, and if they do they will go to heaven. This is because Jesus associates himself with outcasts including prisoners, those who treat outcasts well and offer help will have eternal life.