I follow quite a few blogs via Google Reader and one of them is KC Bike Commuting. When I was trolling a while back I saw a great hack and emailed Noah to give props and ask if I could post here. He kindly said yes. Enjoy and check out his blog for more good stuff. All text and pictures credited to Noah.
Using a 5" long section of old inner tube, I lash my modified Mini Maglite to the handlebars of my road bike as a backup-backup headlight.
Take a 5-inch section of old inner tube (this one flatted years ago) and cut two holes through both layers using a pair of scissors. Make sure they're big enough for your flashlight to pass through. This is a 28mm inner tube. Much smaller than that, and this might not work too well.
Pass the body of the flashlight through one hole, then wrap the tube around your handlebar. Stretch the tube out and pass the tail of the flashlight through the other hole. Adjust angle accordingly.
More Flickr photos can be found here.