This first one is by Richard the Lionheart, composed during his imprisonment while Duke Leopold of Austria was seeking ransom for him. Leopold was excommunicated for imprisoning a crusader, but the ransom was heavy all the same.
I don't think they ever did get old Railroad Bill, though the Alabama boys sure did try.
Johnny Cash did a lot of prison songs. This one is from San Quentin.
But the king of prison songs in recent years is David Allan Coe. He went to jail at nine years old, and spent most of his time for the next twenty years inside. He had an interesting career after that, living for some years in a hearse he insisted on parking right outside the Grand Old Opry, and later in a cave in Tennessee. I wouldn't watch this one if you are of a sensitive nature, but if you do watch it, give some credit to the prison officials who let him do this bit for a crowd inside.