Legal in NJ.
In the United States, the legality of headlight flashing varies from state to state. Historically, law enforcement officers give citations for headlight flashing under three types of laws: (1) laws prohibiting a person from obstructing a police investigation, (2) laws prohibiting a person from having flashing lights on their vehicle, and (3) laws prohibiting shining a vehicle’s high beams at oncoming traffic. The specific language of each law varies by state along with courts’ holdings on whether their respective laws prohibit headlight flashing. Additionally, although not legally binding, the state driver’s manual of some states suggests flashing high beams under specific scenarios (e.g. if an oncoming vehicle is using its high beams, driver’s manuals suggest a motorist flash his or her high beams).
In Alaska, a State Trooper has probable cause to stop a driver who flashes a vehicle’s high beams based upon a violation of 13 AAC 04.020(e)(1).
In Arizona, flashing high beams or headlights is a violation of A.R.S. Section 28-942.1 (Failure to Dim Headlights).
In California, headlight flashing is legal in some situations and illegal in others. It is legal for a driver to flash his headlights to indicate intention to pass on a road which does not allow passing on the right. However, headlight flashing on multiple-lane highways is illegal.
Florida state statute indicates that "flashing lights are prohibited on vehicles except as a means of indicating a right or left turn, to change lanes, or to indicate that the vehicle is lawfully stopped or disabled upon the highway". This has been used as a basis for issuing a moving violation with a $90 fine to drivers who flash their headlights to warn oncoming drivers of speed traps; some police and at least one journalist believes that the law applied to those who manually flash their high beams.
In Maryland, police officers ticket drivers for flashing car headlights under a law which prohibits driving in a vehicle with flashing lights and laws prohibiting "obstructing a police investigation". The American Civil Liberties Union of Maryland challenges the current interpretation of the law, contending the law refers to an adjective and not a verb; automatic flashing lights on non-emergency vehicles are illegal, but the act by a driver of flashing a vehicle's headlamps is not. Though ticketing was common in the 1990s, Maryland and Washington, D.C. police say that flashing one's headlights was not against the law in either place.
In Massachusetts, the practice of headlight flashing is technically not forbidden. A clever police officer though can ask a motorist if they were flashing their lights to warn oncoming motorists of police. If the motorist says no, the officer can ask if the vehicle has defective lights—which is a violation of Massachusetts General Laws Chapter 90, Section 7.
In New Jersey, drivers are allowed to flash their headlights to warn approaching drivers about a speed trap ahead. In 1999, The Superior Court of New Jersey Appellate Division held that a statute limiting how far high beams may project is not violated when a motorist flashes his or her high beams to warn oncoming motorists of radar. The Court also concluded that a stop by a police officer based upon high beam flashing is also improper.
In New York, headlight flashing is not illegal. New York Vehicle and Traffic Law Section 375  requires that headlamps "shall be operated so that dazzling light does not interfere with the driver of the approaching vehicle". In 1994, New York Supreme Court, Appellate Division held that flipping or flicking high beams at approaching vehicles is insufficient to cause the "dazzling lights" prohibited under New York Vehicle and Traffic Law Section 375 . In 2009, the New York Supreme Court held that the flashing of lights alone is not a violation of New York Vehicle and Traffic Law Section 375 , that stopping a vehicle based upon that is illegal, and all evidence gather as a result of the illegal stop should be suppressed.
In North Dakota, when an oncoming vehicle is within 500 feet, high-beam flashing for any length of time (including momentary flashes) and for any purpose at night is illegal under N.D.C.C. Section 39-21-21.
In Ohio, courts have held that the act of flashing one's headlights so as to alert oncoming drivers of a radar trap does not constitute the offense of obstructing a police officer in the performance of his duties, where there was no proof that the warned vehicles were speeding prior to the warning. In another case, where a driver received a citation under an ordinance prohibiting flashing lights on a vehicle, a court held that the ordinance referred to the noun of flashing lights and did not prohibit the verb of flashing the headlights on a vehicle. In a difference case, a court held that a momentary flick of the high beams is not a violation of Ohio R.C. 4513.15 (which prohibits drivers from aiming glaring rays into the eyes of oncoming drivers).
In Pennsylvania, the Supreme Court of Pennsylvania has ruled that flashing one's highbeams during the day to warn of speed traps is legal.
In Tennessee, flashing headlights to warn oncoming traffic of a police car ahead is protected free speech under the First Amendment to the United States Constitution.
In Virginia, headlight flashing to warn of police activity is not illegal, even though other evasion techniques like radar detectors are outlawed.
In Washington, high beam flashing is illegal. Washington law prohibits flashing one's high beams within 400 feet of another vehicle, including using them to signal for any reason. Under section 46.37.230 of the Revised Code of Washington, flashing one's headlights illegally may result in a $124 traffic infraction.
In Wisconsin, the law allows a vehicle operator to intermittently flash a vehicle’s highbeam headlamps at an oncoming vehicle whose highbeam headlamps are lit.
Stay hungry. Stay foolish.