What you're looking at is a carbide lamp, and it looks to be a Petzl Aceto. What you can't see in this photo is the generator, which is a round canister with two parts. The upper part contains water, which drips into the lower part containing small lumps of calcium carbide. The reaction releases acetylene gas, which travels via a tube to the actual lamp.
Compared with electric lamps they have a few advantages:
- Much more robust and resistant to water ingress (water is no harm at all)
- No need to recharge batteries every day (it's easy to carry enough carbide for a week-long trip if necessary)
- Continuously-variable brightness (and peak brightness greater than halogen bulbs)
- Performs better in the cold
- Actually generates warmth (both the generator and the flame) - useful in emergency situations
And a few disadvantages:
- A tendency to extinguish in waterfalls
- Leaves soot marks when waiting around
- Spent carbide needs disposing of properly
Over the last couple of decades, electric lamps have improved greatly with new technologies (Li-ion batteries and LEDs) and better build quality that the advantages aren't as great as they used to be. And some cave systems have restrictions prohibiting the use of carbide (generally for conservation reasons, due to a history of indiscriminate dumping of spent rocks). But carbide still comes into its own on long expeditions, and as the photo shows, it's common to have both carbide and electric on the helmet so that each can be used where it's the best tool for the conditions.