The problem people find with emails is that it is difficult to communicate the tone of your voice.
Depending on the mood the person on the receiving end is in will determine how it is read.
The thing you were trying to joke about? It might be read as being snooty. The friendly email sent to cover up the annoyance you feel? It will sound immature.
When you send a professional email that may sound rude, you can feel compelled to add a smiley face or put a “LOL” next to it. You need to stop doing that now – you will start to see a difference on how you are treated in the workplace.