The poem is a pretty despairing picture of what happens when something long hoped for and dreamed about is constantly promised but never realized. It's a raisin in the sun which dries up, a sore which festers and oozes, it's a load so heavy it sags, and, finally, it explodes. Clearly this is meant to depict the plight of the Blacks during the 1930s and '40s, when "Harlem" was written; and it was certainly true at least through the 1950s into the 1960s.
A Raisin in the Sun paints a similar picture of life for a typical Black family at about the same time. They hope for so much, but at every turn, it seems, their dreams are deferred. Mama should be able to retire but can't; Beneatha does have opportunities, but none come to fruition--yet; Ruth is in such despair that she considers aborting her unborn baby; and Walter is so desperate to make something work that he nearly loses everything, including his family.
The two works are, indeed, similar, which is why the poem is cited by Hansberry in the front of the text. Here's the one dramatic difference between the two, though--"Harlem" ends with an explosion, and Raisin ends with Mama clutching her small plant and her family heading for a hopeful future.
You can break the poem down line by line and see how characters and events play out just like the poem. Examine each key verb in the poem for its connotations, and you will find powerful parallels between individuals' choices and circumstances and the poem.
"A dream deferred": whose dreams are deferred and whose are successfully pursued?
Beneatha stands out as the younger generation whose dreams (a college education, freedom of choice in relationships, freedom to form her identity) are being acted out with some autonomy. Beneatha is teased by her family for "flitting" from one hobby to another, but as she experiments with guitar and riding lessons and other interests, she demonstrates excitement and interest in a world of possibilities where many options can be explored. She dates two men at once. She is forever chastising the rest of her family to act with independence and courage. Not that she is always right: what happens, for instance, when she tells Mama that she doesn't believe in God? Beneatha is a strong, bold character who takes risks and doesn't seem to be living out 80% of the poem's story. She doesn't "dry up," "fester," "stink," or "crust over." She doesn't "sag." But are there places in the story where she loses her temper -- where she explodes? Examine her scenes with Mama, her brother Walter, and with George Murchison. She gets a bit testy with Asagai, but examine the scene with Mama and George in particular to see where Beneatha's dream smacks up against the dreams of her family and one of her boyfriends.
Now, "dry up" and "sag" are two verbs that imply a person who has given up, whose spirit is flagging. Who in the play struggles to keep going, who seems depressed? Ruth. Find evidence to show how she is depressed and what dream she hopes for. Look in particular at the opening scene of the play, how Ruth interacts with Walter, and then check out act 1, scene 2, where Ruth confesses that she has made a "five-dollar down payment" to a woman. This woman is an underground abortionist, since abortion is illegal at the time. Note Ruth's demeanor and depression in this scene.
"Fester" and "stink" might well apply to the first and second generation of men -- both Walters. "Fester like a sore" implies pain and suffering, physical complications, to the point of infection. First of all, where is Walter Senior, and why did he die? Then look at Walter in act 2, scene 1, and how he interacts with his wife and mother when he discovers that Mama has taken the insurance money and bought them a home, in hopes of achieving her dream -- a home with sunlight and space and peace. No roaches and darkness and danger -- that's Mama's dream. Walter is angered by a dream that inspires both Mama and Ruth. Contrast his dream with Mama's, the one that he's cooked up with Bobo, and see the danger and the potential for "infection." In fact, what happens to the dream Walter has? What role does Willy play in exposing the sickness in Walter's dream? (Note that it's not Walter's desire to be financially successful that is unhealthy; it's the way he wants to make money that is full of potential "illness"). You'll note that I'm extending the metaphor here as far as it can go.
George Murchison seems to be "living the good life" as a wealthy young man, but there is something artificial and fake about him that Beneatha strongly dislikes. Look at the scene where she chops off her hair -- goes natural -- and how George reacts. How is George's dream for himself and Beneatha similar to a "sugary sweet"?
One might also argue that Mama is a bit too Pollyanna at times, doing her best to believe and hope when good things aren't happening. Where does Mama herself seem to crust over, insulating herself from reality? Also look at Ms. Johnson, the pie-scrounging neighbor, always after something sweet...she's a little "syrupy sweet" on the outside, but what deferred dream is hidden in her bitter insides?
Finally, there is a threat of black families who try to integrate white neighborhoods of being maimed or killed by racist actions -- the bombings. Look at what news Ms. Johnson and Mr. Lindner bring, and you'll have your "explode."