Some Traffic lights have a sensor which will pick up on whether a car is there or not. Emergency vehicles are treated the same as others. If the sensor has not picked up that you are waiting AND there is no-one at the other side then flashing your lights may help. A lot of lights do not have sensors though and are programmed to change on a set time interval.
Doesn't stop me from flashing 'em though!