You may want to take a look at DeMarco and Lister's _Peopleware_ for several studies along these lines. There's a lot of focus on how having a comfortable and quiet (i.e., not distracting) environment relates to productivity.
Some people could code in a wind tunnel, most people probably can't.
I personally focus better with a comfy chair, a good keyboard, two monitors, tea, headphones (or earplugs), a whiteboard, and enough desk space to lay out notes. Oh, and absolutely good lighting.