(Answering my own question for others with the same problem).
The symptoms: The YJ (and a lot of other Jeep models) have an up down toggle switch on the dash When the switch was in the on position, the headlights would randomly flash on and then off about every 5-10 seconds, worse when it was raining or wet out.
The problem: The headlight switch was more than 20 years old and full of fuzz and corrosion.
The solution: Replace the switch, it's $20 new at most auto stores and requires only a Phillips head screwdriver.
Other potential (but less likely) solutions are:
If the headlights flash on and off, there may be a problem with the bulbs or fuses. There may also be a problem with the battery connections or wiring.
TRY CHECKING TO SEE IF YOU HAVE A HIGH BEAM HEADLIGHT OUT. tHIS WILL CAUSE THE PROBLEM YOU HAVE.
Bad ground on the brake lite circuit.
Not sure what Kind of car this is, but usually if the blinkers run fast it's because you have a bulb burnt out. I'd check your tailights first.
Alternator
Possible ground issue at the taillights.
i would check the wiring for cracks
Check the fuses.
I would replace the headlight switch as Ford has had their share of these problems.
Headlights run off the battery not the ignition...
A bad ground wire will cause dim headlights, or will cause lights not to work.
This is related to the IOD fuse located in the fuse box under your hood.