From LXF Wiki

In shell commands, a flag is a parameter you can set to any of a small range of values, to control how the command acts.

Politically, a flag is a graphical design identifying a country. Good examples of striking flags include Macedonia and South Africa. Bad examples include Libya (just plain green) and Somalia (a single white star on a pale blue background). Although no connection has been established between a flag's design and the country's prosperity, many people believe that the use of weapons on a flag - as in many war-torn African nations - doesn't give a good impression of the country on the global stage. People often like to burn the flags of countries they don't like. This is good because it reduces Internet flame wars and so saves bandwidth.