An excellent article that explains some of the mysteries behind those beautiful prayer flags, including those that hang on poles:
According to Lopon Pema Gyeltshen, one should know the colour of prayer flags when planning to hoist one as they carry great significance.
White – to clear your path from barchey (obstacles)
Yellow –to earn merit
Red – to curb the power of enemies. For example, in wars or even when facing an opponent at an archery match
Green – to ward off envy and jealousy
Blue – if something you planned, like business, is not going according to plan
The five colours also symbolize the five elements – blue-wind, white-water, red-fire, green-space and yellow-earth.