First, make sure this happens during daylight and parked. It will make it a LOT easier to diagnose if it does.
If it only happens when driving, it will be a loose connection somewhere and much harder to track down. See Between the seats for electrical diagnosis.
Now, if it happens when parked during the day, cause it to happen (turn on the headlights and wait until they stop working), then check the main switching components for heat. Use either an infrared temp gun (preferred) or your fingers (CAUTION! HOT!) to check the temp of the dimmer switch and headlight switch. Both should be warm to quite warm to the touch but not HOT. Hot indicates a resistance that is causing the issue. Of course, since you made it happen, something will be HOT. Also check the temp of the headlight wires going into the back of each bucket from the cabin area.
They are the ones going through the round grommet shown at the back of the bulge in this picture.
If you find a hot component, turn the switch off and allow to cool. Check the wiring connector and tangs of the switch for corrosion. Clean as needed. If the connectors and switch tangs are clean, replace the switch. Also inspect the nearby wiring to ensure it hasn't been damaged.
Headlight switch = Standard Motor Products DS165T
Dimmer Switch = Standard Motor Products DS68T
It's probably also a good idea to clean the contacts on the other switch and the headlight connections and the ground, located by the headlight. This will be a Black/White wire held to the body with a screw. All should be clean, bare metal.
Once this is done, you should check the system voltage while running and with the headlights on. Measure voltage across the battery terminals. Idle should be at least battery voltage, and above idle should be 14+ volts. If you have low voltage diagnose and repair the charging system. This will be in Group 8 ELECTRICAL of the service manual.
BTW, if your fuse block has dirty connections as shown in the picture, it would probably also be a good idea to pull the fuses and clean them too!
Disconnect the battery, then remove each fuse, noting location and rating, then use fine sandpaper or a small wire brush to get those connections shiny again.