In terms of the overall play, Lady Macbeth's sleepwalking scene helps us to see even more clearly the tragic hero, Macbeth's, trajectory as a character. She serves as a foil to him, helping to illuminate his progress from a relatively nice guy to a depraved and ruthless tyrant. In the beginning, Lady Macbeth prays to be as ruthless as possible, to be drained of any remorse or compassion she might feel; at the same time, she believes that Macbeth is "too full o' th' milk of human kindness" to do anything unscrupulous in order to gain the throne. She plans the murder of Duncan and then chastises Macbeth for dwelling on what they'd done.
However, by the time she sleepwalks, Macbeth has devolved into a despicable human being, ordering the murders of former friends, and innocent women and children. Ironically, Lady Macbeth's conscience can no longer support the role she has played in his change or bear up under the weight of her own terrible guilt. Though she believed him too good and hoped to steel herself to be capable of real evil, it turns out that he was the one who was truly capable of evil and she is the one with more fundamental "goodness" than he (if we can use her guilt as evidence of her goodness). The sleepwalking scene is Lady Macbeth's last and completes her work as Macbeth's foil, to help us further understand the extent to which he has fallen, and it also provides a great deal of irony and tension, leading up to the climax of the play.
Her evolution is incredibly provoking because Lady Macbeth had seemed to be sure, initially, that she was capable of terrible things. She turns out to be the more scrupulous of the two, which is pretty unexpected given the way things began.