In addition to what has been stated, when Tom Robinson takes the stand in Chapter 18 of To Kill a Mockingbird, he has to guide his useless left arm onto the Bible in order to be sworn in. However, his hand slips off and when he tries to put it back, it slips again. Judge Taylor growls, "That'll do , Tom."
It becomes obvious, then, that Tom Robinson could not have struck Mayella, whose injuries are on the right side of her face, even before Atticus questions him. As he responds to the questions of Atticus, Tom is direct and polite. When Atticus asks him if he has ever entered the Ewell property without express permission, Tom replies three times without taking a second breath, "No, suh, Mr. Finch." Scout observes that he is a "respectable Negro." And, he is kind. But, this kindness is what damages his chances of an acquittal. For, he says what is not politically correct for the 1930s: He says, "I felt right sorry for her, she seemed to try more'n the rest of 'em." Expressing pity for Mayella is construed in a segregated Southern town to mean that Tom puts himself above Mayella. And, of course, even though Mayella is "white trash," she is still white and not socially beneath Tom. This statement of Tom Robinson's underscores the theme of racial prejudice.
I guess you can say that his testimony helps his case because it gives a decent explanation as to what happened. It explains why he is inside the Ewells' house and why Mr. Ewell saw something that allowed him to think Tom was raping Mayella. Tom's testimony also shows him to be a nice guy who has compassion for others (he feels sorry for Mayella).
But this last part, especially, hurts him. He should not have said he felt sorry for her because that shows that he does not "know his place." If you feel sorry for someone it implies you are somehow better than them and that is not a safe thing for a black person to imply back then. If the white jury believes that Tom thinks he is better than a white person they might punish him partly to put him back in his place.