"Sonny's Blues" takes place in Harlem during the early 1950s. The city plays a pretty important role in the narrative, since part of the reason Sonny turns to drugs is to escape the feeling of being trapped by his surroundings. There are people suffering from poverty, prostitutes who have been beaten up walk the streets, young men feel the weight of limited possibilities, and "find themselves smothering in their houses" (72). This is a bleak place.
As Sonny and the narrator are driving back to the narrator's apartment (after Sonny gets out of jail), the narrator starts to really think about the streets in this neighborhood where he and Sonny grew up:
We hit 110th Street and started rolling up Lenox Avenue. And I'd known this avenue all my life, but it seemed to me again, as it had seemed on the day I'd first heard about Sonny's trouble, filled with a hidden menace which was its very breath of life. (73)
It's as if the Harlem streets have a life of their own and contain within them an inherent danger that lives just below the surface. This worries the narrator, since he's the one bringing Sonny back to this place, "back into the danger he had almost died trying to escape" (76). Far from being mere background, Harlem is as much a character in this story as any of the actual people.
But "Sonny's Blues" is also set in a smaller world within Harlem: the nightclub where Sonny plays at the end of the story. This is a far less menacing place. In fact, this dark, smoky little club is a refuge for Sonny. It's a place where he can (at least for a little while) forget about being a drug addict, forget about what awaits him outside, and face his suffering head-on by losing himself in his music. Sonny is a sort of celebrity in the club and the people there want him to be OK; they want him to play the music he's so good at playing. The club is like a tiny, shining light in the middle of the darkness that surrounds Sonny every day.