There are a variety of nodal solutions for flashing lights, this is probably the simplest.
The rate is controlled by value 1 of the sin node. This is set to change every 2 frames.
Flip the step for the other light. (default)
You can use the same function on the ambient value of a prop to make it flash. (Just in case we are talking about alternating headlamps instead of alternating lights)