The rules of etiquette when writing an email are similar to those during a conversation. If you are writing an email to your employer you would not begin the email with slang like "yo" or "sup" but to friends it is acceptable.
A common error people make when drafting an email is to capitalize the beginning of certain words to emphasize their importance. While the idea is that it draws the attention of the reader is true, it is actually viewed as shouting and a big mistake when writing professional emails or even to your friends who might think you are angry.