Step 1: Materials
You will need:
5mm high brightness LED (white)
CR2032 button-cell battery holder
CR2032 3V battery
A switch of your choice (I used a slide switch. Momentary could work if you want to have to hold the button down for an on-demand sort of deal. There are also way better switches that could be used. Something like the soft switches you find in headlamps would be way nicer than my semi-ghetto solution.)
Thread and needle
About half an hour or free time.
Step 2: Cut your hat open
Be sure to decide whether you want to have your LED bulb face out when the hat is rolled up, or if you'll want to wear it without rolling (like in the photo). Cut a small (I mean absolutely tiny) hole for your led to fit through. Poke the two legs of the LED through the fabric of the hat, then bend them to feed them through to the inside of the hat, where you can access them from the cut that you have made in the edge of the hat. The legs of the LED also provide an anchor for the bulb, helping to keep it in place.
Step 3: Solder
Step 4: Sew
After, sew any pieces in place that you need to keep solid (for me, the slide switch needed to be sewed into place) and then sew the brim of the hat shut again.
Step 5: Hang out in the dark
From about three or four feet away, a person can tell that you've got something on your hat, but it's hardly as noticeable as a massive headlamp!