In his “I Have a Dream” speech, Dr. Martin Luther King, Jr. used the metaphor of an island and a lonely sea to emphasize how African Americans were set apart from the rest of society. They did not share the struggles and the triumphs of the rest of American society. Instead, they were separate from that society, isolated by segregation and by their poverty.
Here is the complete passage from which the words that you have quoted come:
One hundred years later (after the end of slavery), the Negro lives on a lonely island of poverty in the midst of a vast ocean of material prosperity.
When Dr. King said this, he wanted to make it clear that America had not included African Americans as full members of its society. Instead, African Americans lived on a “lonely island. “ They were separated from the rest of society because of how poor they were (and, as King says in a previous sentence, because of racial discrimination). When King spoke this passage, he also wanted to emphasize just how rich most of America was. To do this, he spoke of a “vast ocean of material prosperity.” This evokes images of massive amounts of wealth spread out over a huge country. It helped to emphasize the idea that there was wealth all around, but that African Americans were cut off from that wealth and were not allowed to share in it.
Thus, by using these words, King meant to emphasize how rich America was and, at the same time, how it had kept African Americans poor and separate.