Now, I can't claim to be any kind of expert on Near Asia, but from what I can gather it's to do with Turkic heritage (the crescent and star on a red background is incorporated into the Azerbaijani flag as well), and many people believe the Azeris and Turks are of "two states, one nation" It looks like waving the Turkish flag was banned in Azerbaijan for a while, but relations are now "normalised". One source even refers to an agreement whereby "Turkish and Azerbaijani officials once again reaffirmed that Turkish and Azerbaijani flags were not considered flags of a foreign state in each countries [sic]." If true, that would make the Turkish/ Azerbaijani case quite unique.
This all becomes rather interesting when you consider a third player: Armenia.
Armenia does not have diplomatic relations with Azerbaijan,
These conflicts spill over into the Eurovision Song Contest as well. For example, a couple of years ago Azerbaijani citizens who had voted for Armenia in the ESC were interrogated for unpatriotic activities and asked to explain themselves. Controversies have also arisen over the video 'postcards' that introduce national entries and the biographical details of performers.
It looks like the Eurovision Song Contest 2012 in Baku may prove to be one of the more interesting ones yet (assuming Azerbaijan can afford to host the event in the first place)...