In Chapter 24, Atticus tells Calpurnia, Alexandra, and Miss Maudie that Tom Robinson was shot seventeen times and died attempting to escape from prison during an exercise period. Atticus then mentions that he felt that Tom had a good chance at an appeal, but couldn't definitively reassure Tom that they had "more than a good chance." Atticus says, "I guess Tom was tired of white men's chances and preferred to take his own" (Lee 144). Although Harper Lee does not explicitly state Tom's reason for escaping, one can surmise that Tom felt that he had a better chance at escaping from prison than he did being tried again in court. Tom is all too familiar with the corrupt, broken judicial system after being wrongly convicted of assaulting and raping Mayella Ewell. Tom has lost all hope in the court system and has no reason to think that the outcome of his next trial will be any different. Instead of putting his fate in the hands of prejudiced white men again, Tom seeks to control his own destiny by attempting to escape prison.
In Chapter 24, Lee describes how Tom is struggling to deal with his new surroundings in prison, and that there is nothing that Atticus could do to make being locked up any easier for him. Tom firmly believes that he is beyond help, and when he is hauled off to the prison camp, he tells Atticus goodbye, saying, "there ain't nothin' you can do now, so there ain't no use tryin'."
Tom has clearly given up hope that he will ever be free again after his unjust conviction for the rape of Mayella. Despite the fact that Atticus hopes to turn over the sentence through the appeal process, Atticus can't give Tom definitive reassurance that he will be released; to do so would be lying.
Thus, Tom decides to make a break for it during the exercise period in the prison yard. He "broke into a blind raving charge at the fence and started climbing over," despite the guards calling out for him to stop. After firing a few shots into the air, the guards shoot Tom seventeen times. He was moving so fast that (according to the guards), "if he'd had two good arms he'd have made it."
It seems that Tom "was tired of white men's chances and preferred to take his own." It was ultimately desperation that drove him to an escape attempt... and perhaps the realization that he was most likely doomed under the reign of a white judicial system in a time of rampant discrimination.
Harper Lee doesn't really give much information about why Tom tried to make his escape in Chapter 24 of To Kill a Mockingbird. According to Atticus, he considered Tom's chances for a successful appeal "good"; however, Atticus adds that Tom was probably " 'tired of white men's chances' " and decided to take a chance on his own. Tom must have figured that he would have a better chance of escaping while he was in the prison yard during his exercise period. It was then that he broke into a dead run and started climbing the fence. He nearly made it, the guards told Atticus, before they riddled him with 17 bullet holes.