In Chapter 17, Atticus questions Mr. Ewell and Mr. Tate. Atticus gets them both to confirm Mayella’s injuries. She was bruised on the right side of her face and all around her neck. Atticus establishes these facts to show that it is more likely that a left-handed person committed the crime. This is consistent with the bruises on Mayella’s right side of her face.
In Chapter 18, Atticus questions Mayella and she contradicts herself a few times. But she sticks to her story and also confirms the injuries Mr. Ewell and Tate agreed with. Finally, Atticus asks her to identify the man who raped and beat her and she identifies Tom. Tom stands up to reveal that his left arm is twelve inches shorter than his right and is basically useless. This casts huge doubt on Tom’s guilt because of the likelihood that Mayella’s attacker was left-handed. Also, the bruising “all around” her neck would most likely come from someone with two good hands.
There are several things in Mayella's testimony that actually aid Atticus' case, despite Mayella not being one of Atticus' witnesses.
Firstly, Mayella is cross-examined by Atticus, but she seems to be very unsure of what happened/what she has to say. This gives the audience reason to believe that Mayella Ewell is lying about what actually happened in the Ewell home with Tom.
Secondly, Mayella unwittingly paints a picture of life at the Ewells' home. It is made clear that she is incredibly lonely and sad with her life; she has no friends and even thinks that Atticus is mocking her when he asks her about this. It also shows that Tom Robinson really did 'feel sorry for her' when he came in to help her with her work.
Thirdly, Mayella herself casts doubt on the fact that Tom Robinson beat her, by accidentally revealing facts about her father. Mayella mentions that her father gets very mad when he's drunk (which we know happens very often) and this implies that he has beaten her before. This means that it is likely that Bob Ewell beat his own daughter, not Tom Robinson.