There are numerous reasons for this. To name a few;
Economics: Blacks in the past and present tend to be of lower economic standing and are unable to afford other activities such as hockey, baseball, football, etc. You need 0 special equipment to play basketball if you can find a pickup game. Same could be said of soccer but parks that allow for it are not always accessible for black urban youth.
Basketball courts in New York (There are hundreds)
Economics: Poverty and poor education lead into one another. When you live in poverty you are more likely to have a poor education. When you have a poor education you are more likely to live in poverty and this vicious cycle continues. Basketball and other professional sports are a way out.
Psychology: Due to the large amount of black players in the NBA it is easier for black youth to connect with the players. When the majority of players and stars are black it is easier for black youth to visualize themselves as being there one day. Compare this to MLB and NHL where the majority of players are white. Compare this to the NFL where the players that usually receive the most attention and are payed the most (quarterback) tend to be white.
TL,DR: It is easy to find and play a game of basketball if you are a black youth living the ghetto. Basketball is a way out of poverty. Most professional NBA players are black and it is easier to form a connection with someone of the same race than someone of another.
Edit: Of course this may all be moot due to a stereotyping of black culture in thinking that all of them enjoy basketball or that basketball is the most culturally significant sport for them.