The phrase "green on blue" originates from the colour assignments for the various forces in a theatre of operations as shown in the tactical displays. These displays are now all electronic, but this holds true for older systems of markers on paper maps as well.
Red traditionally signifies danger, and is therefore used to show the enemy.
Both green and blue were used for friendly forces in the past. However, with the proliferation of UN "peacekeeping" missions in the 1970s and 80s, the blue was used more for UN forces. This is because UN troops always wear a bright blue helmet or beret due to the UN needing to have it's forces clearly recognizable as UN rather than any one nation. UN vehicles are usually white with the letters UN marked on them, for the same reason.
From this, "green on blue" has come to mean "friendly forces firing on the foreign international peacekeepers".