Mamagotcha asked how I regulate my internet usage. While her comment was on a post about reading, what little advice I have relates to writing, so I'll focus on that.
Using the internet isn't inherently bad, but it's important to prioritize it properly. Writing time should be writing time, not internet time -- or laundry time, dishes time, or cleaning-dust-from-the-keyboard time. Some days, knowing there is undone housework nearby distracts me almost as much as the online world (which is lovely for my house, but doesn't help my writing). The extra challenge of the internet is that it's right there on the same device I use for writing.
I address this problem by temporarily taking my computer offline during designated writing times. Lately I haven't been as careful about this technique as I should, but for a while I had a predetermined set of hours every day that I'd disable the wireless on my computer.
I have enough willpower that I don't turn the wireless connection back on before I'm supposed to, whereas clicking over to email or Facebook is such an ingrained habit that I can't stop myself except by making these inaccessible. Others may need to resort to more drastic measures. Author Jeff VanderMeer has his wife hide the router every morning.
You have to be realistic about what strategy allows you to get writing done. Hannah Moskowitz recently blogged about her writing process, and I had to laugh at "I flip to the internet every 70-100 words and screw around", because that's exactly what I do if I don't take away my wireless access. Moskowitz gets through two drafts in two weeks, she has one book in print, and another one's coming out next year, so I believe she's being realistic that these internet habits work for her. I'll keep writing the practically old-fashioned way.