Why do football linesmen have different coloured flags?

According to News.bbc.co.uk, it is purely for identification - as a help to the media and the clubs when they have reason to mention a particular linesman (now "assistant referee") in any report.

The assistant referee’s flag should always be visible to the referee, unfurled and still whilst running. When making a signal, the assistant referee shall:

stop running
face the field
make eye contact with the referee and
raise the flag with deliberate (not hasty or exaggerated) motions

The flag should be like an extension of the arm when signalling. The assistant referees shall raise the flag using the hand that will also be used for the next signal in a sequence. If circumstances change and the other hand must be used for the next signal, the assistant referee should move his flag to the opposite hand below the waist.

That person on the touchline might look as though he's waving in some low flying aircraft but those flags have a very important role. They used to be called linesmen but now they're referee assistants and they help the referee with offside decisions and signal a number of things, such as throw-ins and substitutions.

So what are these signals? Well you don't need a degree in semaphore to understand what they all mean. Here is a guide to the referee assistant signals shared by News.bbc.co.uk.

Tag: football 
Thursday, September 21 2017
Source: http://news.bbc.co.uk/sport2/hi/sports_talk/1980131.stm

Related questions