Headlamps Flash On and Off While Driving

Could be a bad headlamp switch, a bad high/low beam kickswitch, a faulty connection at either of those switches (replacement switch connector in good quality see here) or elsewhere in the circuit, a flaky ground, or — if the lights only start blinking out after they've been operating at least a minute or two, it's likely an electrical overload tripping the thermal cutout breaker built into the headlamp switch, either because the cutout has grown "soft" or because of increased resistance in the circuit and/or higher-than-stock headlamp wattage. See here to understand the good fix; CrackedBack (here on the board) sells good ready-to-install harnesses.