Mayella's testimony reveals a troubled teen's longing for acceptance. We learn that Mayella was not the typical teen who ran around with a group of friends, but one who had never had a boyfriend, and whose only real idea of a relationship thus far in life is her father. But as she said, "What papa do don't count." (You'll see that Tom says this reporting something she said during his testimony in 19)
It further demonstrates that she is incapable of keeping the story straight, which means she's lying somewhere. She doesn't understand Atticus' courtesy and takes it as insult. This proves she is incapable of understanding the normal activity of adults. Finally, we learn at the end of her testimony that Tom Robinson's arm that he must have hit her with is actually crippled.
In addition to the cogent points already made, in Chapter 18 of To Kill a Mockingbird, Mayella's testimony also reveals that she speaks under duress as she attempts to remember what she has been told to say. Her discomfiture with Atticus's civility also reveals, not only her backwardness, but her not being accustomed to such treatment, suggesting an abusive relationship with her father, an important point as it creates more credibility to Ewell's having struck his own daughter rather than Tom Robinson's having done so. As she recites what her father has probably told her to say, Mayella twists her handkerchief "into a sweaty rope." But, Scout remarks,
Apparently Mayella's recital had given her confidence, but it was not her father's brash kind: there was something stealthy about her, like a steady-eyed cat with a twitchy tail.
That she is lying becomes obvious when Atticus asks her, "You are positive that he took full advantage of you?" and her face contorts. She is also unsure of her age and asks wonderingly "Friends?" when Atticus inquires if she has any; with this question she becomes hostile because she again feels that he mocks her as she obviously has none and lives a lonely and pitiful existence.