It depends on who you ask but you may be breaking the law or you may be exercising your right to free speech. What?
When the Star-News asked Minnesota Trooper Jesse Grabow, if you can flash your headlights at oncoming traffic, he said no, it's illegal. He was quoted in the story saying:
A person is not allowed to “flash” their headlights at another vehicle, even if that vehicle has its high beams on.
So, you can't let them know their high beam lights are flashing in your face. You also can't flash oncoming cars to let them know there is a speed trap ahead, and you flash your high beams to let them know they don't have their lights on at all and are driving dangerously. Keep reading on the final say.
In Wisconsin, it is vaguer about the blinking lights. The Kensun website says Wisconsin state laws say you can only have certain colors on headlights, and they can not be blue or flashing. It does not say you can or can't flash your lights.
It isn't legal but it isn't illegal in most of the nation because there isn't a law specifically listen for each or every state. Even Minnesota's isn't clear. Techdirt says every state has a law against certain kinds of headlights just like Wisconsin. The law says you can't have flashing headlights, but it doesn't say you can't flash your headlights.
Techdirt tells a story about a guy who got a ticket for flashing his headlights into oncoming traffic because there was a speed trap ahead for those motorists. When he did it he was pulled over and ticketed. He sued and two years later, won. The federal judge that reviewed the case said that he was only using his first amendment rights. Wisconsin Magistrate Judge Stephen Crocker ruled that he had a right under the first amendment to flash his lights because his lawyers showed he was flashing in order to get people to follow laws so they weren't going to be ticketed
Is it your first amendment right? It may be, but a police or law officer can decide if you are operating illegally and give you a ticket, then it's up to you whether you want to fight it or not. I think I will just refrain from blinking.