This is a great question. Atticus' examination of Bob Ewell was masterful. Atticus acted as any lawyer would to gain facts, but at the end, he did something odd, which appeared to have no relationship with what was going on. He asked Bob Ewell if he could write. After Bob Ewell said that he could, he asked for proof.
When Bob Ewell, who did not know where Atticus was going with this, signed his name, it was clear to all that Bob was left-handed. And when it came to light that he was not ambidextrous, then it gave further proof that he beat his daughter.
The injuries that Mayella sustained were from a man who was left-handed. What made this point even clearer is that Tom Robinson's arm was badly injured from a work accident. He was handicapped. He could not have beaten Mayella.
So, in a word, Atticus tried to prove that Bob Ewell could have and actually did beat Mayella.