What does each of the characters learn in the course of A Raisin in the Sun?
Beneatha and Walter are the two characters facing the deepest personal challenges in the play, though the family's hardships clearly weight on Ruth and Mama as well. Yet Ruth and Mama are not forced to change in order to cope with the difficulties faced in the play.
The lesson that Mama and Ruth learns might be phrased as a "lesson of reinforcement" from which they learn that the faith and hope they place in Walter in particular is not misplaced. Their trust is rewarded, in other words, and they learn that their investment in their family is not a hopeless enterprise.
Walter comes around. He learns that dignity is not the product of finances or profession, but is instead a product of self-respect. This is the essential challenge that both he and Beneatha face - to achieve a sense of dignity and self-worth.
At the opening of the play, Walter whines about his job as a driver, complaining that he does not want to be someone else's servant. He finds his position debasing. His attitude is, by and large, negative and he places a great deal of value in the idea of becoming a business owner (and in doing so changing his status; escaping servitude).
Beneatha's focus is more positive than Walter's in the sense that she is choosing between modes of being and trying to decide which will be most gratifying to her ambitions, her sense of self, etc. She strives to become a doctor and weighs the options of adopting an "assimilationist" attitude (wherein she might join the Murchison family and be wealthy) or adopting a "Pan-Africanist" attitude (wherein she might join Asagai, metaphorically and practically inheriting a history of self-respect, independence, and self-reliance).
Ulimately, like Walter, Beneatha learns that in each of her enterprises she will be turning away from her family. Her mother helps her to see that the ambitions she pursues implicitly de-value the history and pride of what the Younger family already is.
[Mama] does not hesitate to rebuke family members for actions that oppose the values that she and her husband promoted. (enotes)
The lesson that both Walter and Beneatha learn then relates to the notion of placing value on self and family and learning to see a "grass is always greener on the other side of the fence" mentality for what it is - an evasion and a pleasant but ultimately defeating delusion. Pride is not something given to you, Walter realizes, it is something you give to yourself and claim for yourself.
Walter recalls an incident where his father almost beat a man to death who had called him a bad name. He goes on to talk about the pride his family feels, especially in his sister’s aspirations to become a doctor. He surprises Lindner by telling him that they will be moving into the house. He ends his speech, in a total character transformation, by saying. “We don’t want your money.”