Let's see... Writing situations... Most of my stuff is fanfiction, but okay.
Well, humorous stuff (the bulk of what I write) is best done with a good friend or two around (especially my sister. Together, we come up with hilarious stuff!), but not parents, cause both me and big sis have an awful fear of someone looking over our shoulder while writing. No music for humor, unless it's either a funny songfic, or if the music's something like 'All-Star', or by Weird Al or Veggie Tales or something like that. And TV is a big no-no.
As for action and adventure and drama stuff, I'm a-okay with movies in the background, cause it gets you in the mood, and music's good, especially a bunch of rock stuff (Linkin Park, Disturbed, stuff like that) my sis likes to listen to, although I don't particularly like it, but you have to admit it helps. I don't usually write these types too much, but when I do, it's usually when nobody else is around.
Romance I find is best written with classical music on in the background. We have this one CD with a bunch of Christmassy sounding stuff that really helps. Although that might be one of the reasons so much of my stuff is set in December...
I also like to have some kind of snack around, cause I have a bad habit of biting my nails, and that just keeps me from writing or typing (typing preferably), whichever I'm doing at the time. I especially like celery with peanut butter and chocolate chips on top, caramel apples (though I have braces), and cucumbers. And fresh peaches are wonderful, too! Too bad you can't find fresh ones in mid-December.
So that is my secrets of success. Now you'll know what NOT to do.