Do the brake lights work when you push the brake pedal and do the headlights work when you turn them on?
If yes to both, then the problem will most likely is the headlight switch.
The headlight switch has two sets of contacts. One set is for the dash, park, and tail lights. The other set is for the headlights.