The black, red & green flag or variations of it has been a symbol of black/African emancipation since the 1920s. The most popular version is the Marcus Garvey created "Pan-African flag" which has red on top, black centre & green at the bottom.
These colours are used in official flags of a few African countries which are: Kenya, South Sudan & Malawi. I do not believe it's an ethnic flag as many ethnicities use it & could vary in symbolism for various lands but for me, it could be; black for the night sky or people of that land, red for the blood of that people's forefathers & green for the land of those people. It is also used as the flag of the Biafran independence movement.
In South Africa; the horizontal colour scheme is also used by the IFP's student brigade called SADESMO.
In the Arab world, it has been used by the Kingdom of Libya (1951) & vertical colour scheme used by Afghanistan under Taliban rule (2004).