Accents are important anywhere you want to use formal language, look professional, etc. Places where using "correct" Spanish is important. Writing an article for publication, a letter to a superior, in exams.
Despite what other people say in their answers, leaving out accents doesn't result in sore eyes, confused readers, hard to read text. If you're writing to somebody who you know likes everything proper you should expect this to irritate them. Generally people that don't like slang also won't like omitted accents.
I would compare it exactly to writing English in all lower case and omitting apostrophes.
Almost all of my friends from Spanish speaking countries never use accents when writing on the Internet, in emails, Facebook, instant messaging, SMS.
It's a matter of style. When you want to be formal, stick to the official orthography, with all the accents, punctuation, and capitalization used as the RAE advises. If you don't you will be interpreted as at least lazy and unprofessional, but perhaps worse.
If you are a young person chatting via keyboard to other young people, you don't have to be formal, just like in English. Your friends might even find it a bit stilted if you're too formal.
In fact in instant messaging and SMS I find my Spanish speaking friends go much further and use lots of special slang spellings I don't know at all - just like people do in English.
It's probably a good idea to be consistent though. It will be less pleasant for some people to read if you phase in and out of accent usage in a single piece of writing. In this case it will seem a lot more like spelling mistakes like mixing up "to" and "too" or "their" and "there" and "they're" in English. Context will show which word you mean but your wrong spellings will throw the reader off.
I do note however that when Spanish is written in all capitals that the accents will fairly often be omitted even in places where you might expect more formality and even though the RAE says the accents should always be used even in all capitals.
In short: You might make a faux pas if you leave them out, but you'll never make a faux pas if you put them in. Other than the cool kids sometimes thinking you're not cool (-;