What headlamps do you buy? What's the voltage and the wattage (or the current) the lamp uses ?
The headlamp may pull a lot of current when it starts which your bench power supply limited (maybe you have a 3A max power supply or something like that?)
The batteries are probably able to provide a lot of instant current and the switching element in that IC probably blew up. The inductor may also not be rated for your peak currents.
Also be careful with those buck regulators - just because it says 4.75v-24v it may not be wise to use 19-20v as that's close to 24v. Also notice they use ceramic capacitors, and if those are only rated for 50v when you push 20v on them the capacitance drops significantly and that may make the circuit unstable.
Here's the datasheet for the regulator chip :
http://www.richtek.com/download.jsp?t=UyUyRmFzc2V0cyUyRnByb2R1Y3RfZmlsZSUyRlJUODI3MiUyRkRTODI3Mi0wMi5wZGYlM0QlM0Ql%0AM0REUzgyNzItMDJDStudy it, compare with what you have on that pcb and see what broke.
I also suspect the inductor may not be up to par like i said above.