Let there be light, a federal judge ruled.

A trial judge in St. Louis this week held that drivers have a First Amendment right to flash their headlights to warn oncoming vehicles about speed traps ahead.

The case involved a lawsuit brought by the American Civil Liberties Union of Missouri on behalf of a driver who was pulled over and ticketed...