Many a time have I found the need for something to attach an accessory to my bike. The biggest pain I always encounter is how best to carry things without interfering with the visibility of my bike lights.
At time of writing I mainly use a pannier bag (on the back) and a handlebar bag to carry all my commuting stuff in. The first problem I faced was how to attach my front lights with the bar bag blocking their visibility from the normal handlebar mounting position. The second was how to attach a rack top bag and not obscure the normal seat post mounting.
Sometimes there are commercially available accessories you can buy to attach lights (and more things) too (e.g. a handlebar extension a.k.a. accessory bar) but often the only option is to DIY something until you find the right accessory to get.
And as they are only a few pounds I bought a rack mount bracket for my light:
(though the image is actually upside down)
Edit 30/09/2011: Since then I have setup my new bike with this until I got a handlebar extension and that works just as well as the DIY extension – but costs more money and is less fun, there is more fun and accomplishment in DIYing something like this.
Edit 05/10/2011: You may notice my Airbike SL1 is attached using a DIY quick release I made from some cheapo light bracket I had lying around. Unscrewing the light every time I parked my bike anywhere was just annoying, so I DIYed it.