Sonny is blue about life and being outcast. In this sense, "blue" means sad, unhappy, despondent. Sonny is also a musician and when he plays, he plays African American invented music, bebop jazz and the blues. In this sense, "blues" refers to a genre of music related to jazz, originating in Southern African American communities, that has a drop in pitch (called a flat or bent tone) on the 3rd, 7th, and sometimes 5th tones of a scale, known as the Blues Scale, which is a diatonic major scale.
Sonny plays the blues to help obviate, or do away with, his profound suffering caused by his position as an outcast. His brother sought to obviate his suffering, caused by belonging to a race that is outcast, by assimilating, while Sonny turned to playing the blues (music) as a record of and an outlet for his blues (feelings). It is up to the reader to decide which approach produces the least suffering.
In the title of his short story "Sonny's Blues," James Baldwin creates a double entendre: First of all, Sonny is "low"; he suffers from heroin addiction and has been arrested for possession of the drug. He has hit the figurative "bottom" in his life and must be greatly depresssed as a result. Adding to his woes, Sonny is alienated from his brother, who has become an algebra teacher at a high school in their old neighborhood of Harlem. Secondly, as a musician Sonny plays jazz and the "blues," a music that originated with the African-American community that expressed their sadness and melancholy; "blues" is a termed that generated from the "blue devils," a term for depression.
It is fitting, indeed, that this double entendre also appears in the denouement of the story as Sonny plays with such melancholy emotion at the jazz club to which he has invited his brother, who, at last, comes to understand the reason why his brother Sonny has felt the blues in his soul.