I try to. When I'm going down a windy(the twisty type, not the blowing in the hair type) mountain road and pass a cyclist going uphill the other way in the opposing lane, after I pass him if I see a car nearing the bike, I'll turn on my lights to alert the driver's attention so he'll be more vigilant around the bend. Also, if I see a police lurking in the opposite side of the highway, I'll high beam opposing traffic which alert them to slow down in hopes of avoiding a speed trap. My hope is that this road altruism comes back to me or loved ones.
There have been times where "flashing" someone resulted in the flasher getting run down and beaten as a gang initiation. Some wanna be gang members would drive around with no headlights until someone flashed them, then they would turn around, and force the person who flashed off the road and beat them up. Moral of this story, be careful who you flash and where If it involves a danger where someone may get hurt, yes I would flash, but if I see a speed trap, nope, if they are dumb enough to speed where they would get pulled over, let them. Police have a leeway, usually 8 MPH over the limit for anything over 40 MPH, so if I'm doing 40 in a 35 zone, I back off if I see a police car, and that is enough to not get pulled over, but those who do 50 in a 35 should get nailed.
When I lived in Utah, driving on back roads and two lane county roads, oncoming drivers would often flash their headlights to warn of a county police car doing speed checks
HAHA I stand corrected then. I heard that from my neighbor who was a Police Lieutenant with the local city I lived in. I never questioned it! I can actually see it happening though since I grew up in Chicago. Them gangs do some crazy stunts. OTOH some states will give you a ticket for flashing. The offense is called prohibited use of flashing lights.
Most of the time I don't flash my lights for speed traps. I will, depending on the area. I tend to travel winding country roads, so I will flash my lights if there is debri, temp road construction, or someone biking or walking.
My grandfather flashed his headlights to let people know about a speed trap, one of the oncoming cars was an unmarked police car. Which turned around and pulled him over. He was asked what he was doing, and told the office that he was warning people about the speed trap. I think the officer laughed and let him off. But that was like ten years ago and I can not remember exactly.
In my mostly urban driving, I occasionally encounter three situations in which I am likely to flash my headlights: At intersections with opposing or four-way stop signs, when there is another car that arrived at or nearly at the same time with me, or if I sense agitation or urgency in the other driver. I will flash and follow with a waving-through hand gesture to indicate the other car can go through first. In this case, the flash means "By all means, you go first." When I see a vehicle ahead apparently wanting to enter or cross my lane from a cross street, parking space, etc, and I think it unsafe, I flash multiple times to get the drivers attention (I presume that the driver is attentive and looking both ways!) to say "Hey! Don't be a fool, don't do it!" Because there is an implied safety issue, I usually position my left foot above the brake pedal for instantaneous use should the other driver proceed. In this case the flashing means "STOP!" I recognize that in the different situations the flash(ing) means opposite things... and therein lies the danger of mis-communication. It is best to vigilant in both situations. The third situation involves pedestrians or cyclists in the roadway. It may just be a Ballamer thing, but often on urban neighborhood streets pedestrians walk in the road, even though there is a sidewalk. Also those people are dressed entirely in dark clothing. I flash them whether they are closing or going my way just to say "Hey, I see you! For next 30 seconds or so, act like you have some sense!"
I flash for those who do not realize that their lights are not on. Here in San Diego the police are especially intent on catching people on Crown Point Drive, not an area I frequent much these days. Most folks will flash each other there cause it is a speed trap. They will tag folks for 2-3 mph over. Additionally I will use it to warn folks that I am there, or the horm depending on which would be most useful in getting attention. Making yourself visible to others is part of defensive driving. People are too distracted these days.