I had never heard of these before, I love learning new things! This was a coal miners Oil Wick Cap Lamp that they would securely attach to their hat/cap for light while in the mines. If research serves correct these were used from approx 1850 to 1920 before being replaced with the safety lamp.
eBay