Can someone who is in prison be listed as a dependent on your income tax return?

Yes, provided they meet all the requirements of either a qualifying child or qualifying relative. Generally this is going to require that the person in question spent less than half the year in prison. Otherwise, they wouldn’t have lived with you for at least half the year and you wouldn’t have provided more than half of their support.