In cold weather your battery capacity drops dramatically. So, putting your headlights on took the "surface" charge down to below "starting levels". If you would've let it sit overnight it probably would've started after it recovered. The drive home helped it immensely to gain back it's charge. If you have doubts, hit the local parts store & have them test it for you. (most do it for free) Your alternator is probably fine too.