I’ve found there are two guidelines to buying headlamps for mountain biking, or even nighttime road biking.
The Niterider 700

Rule 1: Spend as much as your budget allows.
Rule 2: Double that amount.
Singletrack riding takes a LOT of light. I mean, I night-ride on trails around my house every Wednesday, and it is dark out there. Road riding, there usually is at least some ambient light. Trail riding, none.
To that end, LED lights have been a real godsend. I rode for years with HID lights that were balky to turn on, and burned hotter than blazes. LEDs are much easier to operate, burn cool, and have fantastic battery life. My current LED headlamp for night riding is a 700 ($350). Super-bright at 700 lumens, which at times can seem like having a smallish car headlight. Run time is around four hours, and charge time about three hours.
The thing is, I really recommend two lights for single-track riding. A bright helmet-mount light throws out enough light. But it can be the wrong kind of light. Because the light hits objects with the exact same angle as your eyes, it tends to knock out shadows behind roots and rocks. So depth perception becomes tricky, and an obstacle may look flat when it’s actually pretty big.
So an ideal setup is another light on the handlebar, to create some shadows out in front of you. You likely can get by with a lower-power light, something like the Stella 300 ($279), which delivers 300 lumens and up to five hours of light on the high setting.
Light & Motion’s Seca 700 is comparable to the Niterider 700, although pricier at $499. I have one, and in my view the Light & Motion has better engineering and a better-designed connection between the battery and the light or the charger. The Niterider has an excessively fussy charging cradle, and a completely redundant battery “holder.”
An interesting new contender is the Nevada-based . That company’s flagship, the A-51, is an LED light that throws out an impressive 720 lumens, offers three-hour runtimes, and is priced at $229 ($30 more if you order a bar mount). One of my riding friends has one, and it’s been an excellent performer.