Tanzania's flag is a merger of two other flags, which is exactly what the country was in 1964.
Two flags into one
Tanganyika and Zanzibar united on April 26, 1964, and the new flag was adopted on June 30. Tanganyika had flown three horizontal stripes of green, black and yellow for the land, its people and its mineral wealth. Zanzibar's flag was mostly red and was flown alongside the symbols of the Afro-Shirazi Party, an identity built around revolution and political change.
The new design took from both, and the political intent was not subtle: a single banner for a single state assembled out of two.
Reading the diagonal
A black band edged in yellow runs across the flag on the diagonal, separating a green section at the top from a blue one at the bottom. Green is the fertile land and the agriculture that depends on it. The yellow edging is the country's mineral reserves. Black is the Swahili people and pride in black African heritage. Blue is water, meaning the Indian Ocean, Lake Victoria, and the other lakes and rivers the country lives off.
In use
The flag flies at government buildings and at national events such as Independence Day, and it represents Tanzania at embassies and in diplomatic settings. Protocol has it raised at sunrise and lowered at sunset, kept off the ground and treated with care. There are no official variants, and the simplicity of the design means it reproduces cleanly at any size.
At home the flag is in schools, government offices and public spaces, and its colors show up in clothing, art and writing. At public gatherings and sports events it does the work national flags usually do.
African flags with the same vocabulary
The black, green and yellow are common across African flags, part of the Pan-African color tradition that came out of independence movements in the twentieth century. The same three colors appear on the flag of Jamaica. What Tanzania does differently is run them on a diagonal rather than in horizontal bands.
References
The International Federation of Vexillological Associations (FIAV)