Anions produce flame colour?
There are two reasons, depending on the anion of interest: 

1) For the flame emission of any species, anion or cation, metal or not, to be observable, it must emit light in the visible wavelength range, and most non-metal anions do not do this very strongly.  

2) Even if there is some emission from the non-metal anion, in many cases their flame excitation efficiency is very low.  

The answer then is the combination of these two things, and the fact that many metals have the opposite tendencies (e.g. high excitation efficiency, strong emission in the visible region of the spectrum), which overrides any weak visible emission from the non-metal anions. 

As noted in a comment, this is not always the case, but it is the explanation for this strong trend.