The term of "nonviolent gadflies" that is used by Dr. Martin Luther King Jr. is used as a metaphor to represent those individuals in society who create enough irritation in a nonviolent way to change or move society in a more positive direction.
As Dr. King was the leader of the Civil Rights Movement in the mid-20th century in America, he had himself been exposed to racist and deplorable acts as an African-American. The treatment of African-Americans in many parts of American society still had yet to be reached towards one of equality and fairness. These deplorable acts of racism, unfair and unequal treatment, and bigotry were aligned with what Dr. King referred to as the darkness.
Dr. King mentioned that the it was the responsibility of the "nonviolent gadflies" to irritate and move societal standards towards that of the light. The ideals associated with light are in stark contrast with those of the darkness. Dr. King discussed ideas of equality, fairness and respect for all men and women regardless of their beliefs, associations and skin color.
It is the "nonviolent gadflies" who can persist and move change in a positive direction by grouping together and nonviolently insisting on change.