Hypothetically, it's to protect the children, not make the evil villains more obvious(if it were, the law would require real guns to be bright colors and toy guns to be dark).
Got put in after some kid removed himself from the gene pool by pulling a plastic gun on a cop.
But people DO get brightly-colored real guns sometimes. Because they're "kewl gangstaz" or something. They don't exactly use it as a confusion tactic, though.