Step 1: Here's what you need
I like my Giro for the good buckle/strap system and the ventilation. You can get good helmets cheaply by buying last year's model closeouts at places like Nashbar, Pricepoint, etc.
Just about any helmet will work- almost all have plenty of vent holes- you'll see why that is important in a minute...
The other things you need are a flashlight- this thing is going to be on your head, so a small one is best. I used a "River Rock" flashlight that I bought at target for $20. It uses two AA batteries, it's weather proof and VERY bright. A pair of alkaline batteries will give full output for 4-5 hours. Rechargeable NiMH will provide full output for 2-3 hours. That's plenty for most bike commutes in the dark.
Oh yeah, you'll need a couple rubber bands too. I used whatever I had around. Just make sure they'll fit...
Step 2: Putting it all together.
Step 3: Almost done!
Done! That wasn't hard, was it?
No go out and ride, but watch out for cars!
Step 4: Improvements/Variations
Use sticky velcro tape and put one piece on the helmet and its mate on the flashlight. Then you can just stick it on and go.
Or you could just keep a few extra rubber bands around...
You can do the same thing to hold the light on the handlebar stem of your bike if you don't want it on your head. It is probably better for racing-type bikes because of the crappy position in which you have to hold your head to see where you are going.
I ride a recumbent so the top of the helmet is fine for me.