The simple answer is that the apartment is a very tangible symbol of what the family is missing, and what their dreams are trying to move them out of. The apartment lacks space, with Travis sleeping on the couch, and Mama and Beneatha sharing a bedroom. The apartment lacks sunlight, with Mama's plant barely surviving.
The detailed description of the apartment also helps establish the time period of the play, as well as important family values. Mama's pride in keeping the place clean and tidy, Walter Sr.'s portrait in a place of honor overlooking the family, and Beneatha's embarrassment when Asagi comes to visit are all communicated through the play's setting.
The move to the new house (hope) offers sunlight and space, to give the family room to grow and light to see their dreams come true.