I find that making sure I can find some "alone time" to write helps me out a lot. By alone time, I mean - without distractions. It's not always possible; however, I find I do my best writing when I do have peace and quiet. As a side note, I actually also find I do my best writing at night.
::shrugging::
Now, depending on what I'm writing, music plays a role as well.
Example: Poetry, I love having R&B Music on.
I guess my advice would be, if you are easily distracted, but love writing, make sure you find your alone time. It will show in your work if you do - as well as if you do not.
-HD-