What an interesting question! It's quite an baffling way to end the second act, I'll admit. Quite simply, Annie has just had a late-night session with Helen, using Percy to spark jealousy a bit so that Annie can work with Helen more closely. Before the lullaby begins, Annie's last line is, "Now all I have to teach you is--one word. Everything." Annie then picks up the doll that causes so much mayhem earlier in the play, sits in the rocking chair, puts on her glasses, and happily begins singing "Hush Little Baby."
What is important here is the progression of feeling that Annie experiences while she participates in this lullaby. First, Annie "whispers to it in mock solicitude." Soon after Annie "lays it against her shoulder, and begins rocking with it, ... she talks the lullaby to it, humorously at first." Later, "the rhythm of the rocking takes her into the tune, softly, and more tenderly."
Look at Annie's movement from disrespect to tenderness! In my opinion, this directly correlates with what is happening in Annie's relationship with Helen. Remember Annie's first experience with Helen, mocking and grousing behind Helen's back. Now Annie desires to be close to Helen and feel affection as Annie teaches Helen "everything." (I could even go further and say that this correlation extends from Annie to Helen, herself. Helen is similarly moving from feelings of hate to feelings of affection.)
While this is happening (and even though this is happening in a separate place than the family), the family has a definite reaction. James, Keller, and Kate all stand "moveless" while each of them has stopped where he/she is and "turned his/her head, as if hearing."
Similar to the meaning behind Annie's lullaby, the family's reaction indicates that they notice Annie's change to tenderness towards Helen. No more snide reactions such as when Annie is asked if she likes the child, when she replies, "Do you?"
Love is growing here. Annie is growing to love Helen, ... deeper than a mother's love perhaps: the love of a beloved teacher. The family is growing to love Annie for the work she is doing with Helen. And if love isn't in the vocabulary yet, they are at least admiring Annie's desperate attempts.
There's more to come, Keller family. More to come.
In the play "The Miracle Worker" Helen has been blind , deaf, and unable to speak since a very young age. She would likely have no recollection of singing a lullaby or rocking a baby. Helen imitates the behaviors as she has learned them. It seems ironic that Helen who can not see an infant rocked, nor hear a lullaby, would repeat the actions.
Rocking is an innate way in which a mother comforts a child. Helen may have engaged in self-stimulation for comfort with the doll, but she would not have known how to innately try and sing to the doll.
Later in the book after Annie has been involved in working with words with Helen she rocks the doll on her knee. The doll is the same doll that Helen had first rocked that Annie had allowed Helen to hold Annie. The irony is that Annie has just come from a very dramatic tussle over Helen's behavior and now she is calmly rocking the doll.