I have to agree with John.. As far as I know it was so the inspectors could easily identify circuits that are "different" in new construction, as in Blue NM for the arc fault circuits and yellow for the 20A kitchen circuits. Also according to one inspector I talked to and almost got dinged for was to identify voltage! Anything with a red covering contains red and black conductors and is "supposed" to be 240V, no neutral, and explained that its to prevent anyone from thinking the "white is neutral" when in fact it is not such as if you used a regular piece of 2 conductor N.M with black and white conductors on a 240V circuit. That is where I almost got dinged but the inspector "let it go this time" and laughed a bit while saying so! Years ago I can remember they had plastic sheathed NM in 3-4 colours and even way before that in the days of paper wrapped "loomex" they had what 7 colours that I can think of off the top of my head that were used throughout the years but I think it was only a manufacturing thing back then, the sheath colour meant nothing.
Personally I like the idea of colour coding the cable for the obvious reasons, but it also helps me identify what coils of what cable I have in my van at any given time!
Around 1998, Rex Cauldwell wrote an article for "Fine Homebuilding" magazine about wiring techniques with Romex. As a side note, he showed how he used spray paint to mark the edges on new rolls of Romex, to help his guys grab the right roll from the truck the FIRST time.
Maybe two years later, one cable maker (I think it was Southwire) began to distribute the colored stuff. Other makers quickly followed.
AFAIK, this was a purely voluntary move by the makers, without any code or industry standard to encourage it. I also suspect that there may be some economies involved; adding color makes it easier for the maker to mix in recycled materials.
Someone told me once that when they made that standars change, that blue was going to be the color of 14-2, I think I even remember seeing that at a trade show once. Obviously that did not happen, but it would be interesting to hear the manufactures perspective on this question
Our equivalent of NM in Britain isn't so colorful.
The old 1950s/60s Imperial-size cables were a case of "you can have any outer sheath color you like so long as it's gray."
I'm not exactly sure when it first appeared, but sometime after the switch to metric sizes in the 1970s manufacturers started offering white sheaths as well. They became quite common during the 1980s, especially for exposed surface runs. The clips were then made in both gray and white versions.
With the recent change to the new European color coding for the internal conductor insulation, the cables are back to being available only with a gray sheath.