The headlight circuit is independent of the start circuit or I would have said the ig switch is at fault. The fact that the headlights do not work from time to time tells me that the lead from the battery/starter post coming to the fuse panel or the fuse panel distribution bus is shot, loose or corroded in some matter to the extent to interupt/block current flow. I would look for corroded connectors at the starter battery post and or at the fuseblock. A dead give away is greenish or whitish powdery looking stuff on connectors. Even tho you may be able to wipe this off the outside, it tells me that the inside of the wire is moisture contaminated and has a very high resistance. I would make absolute sure that the grounds are all in place and clean as a whistle! So be the cables too.
If this happens again, take a long piece of 8 or larger wire and jump from the battery to the fuseblock positive side. Then try the lights again. I bet they are bright and the car will start.
------------------
Steve Jack
-Concept One Pulleys and Brackets
-Marketing Technologies Limited
-Northern/Southern Rodder Magazine's "Jack'Stands" technical column author/originator