I actually don't like sarcasm very much. Sometimes, it's used to bring people down, and it can shut down ideas and openings in a conversation if it's used that way. Also, some people don't know when they're crossing the line and being straight-up rude, insensitive, and mean. These people take sarcasm so far that they come across as unappreciative, antisocial, and well...jerks (putting it lightly).
For me, I treat sarcasm almost exclusively as a form of humor. I try not to bring people down if I can, or at least be sarcastic in a way that's obviously meant to be a joke. Well, "obviously" being the key word. It isn't always interpreted that way. If I'm writing and the person on the other end doesn't notice something like an abrupt change in tone or something like this to give a hint, it can lead to a round robin of bad communication. Or worse, it might come across as all the bad things I wrote about earlier. That's why I'm not the biggest fan of sarcasm. Plus, I tend to deliver sarcastic quips pretty subtly or dryly. So people who don't know me really well might miss what I go for and get a bad read of things.
A fun thing I like to do when other people are sarcastic to me is to either ignore it completely or take it in the most literal sense possible. It can deflect sarcasm in such a way that the other person is left thinking "What the heck just happened?". It's nice to use if people are being jerks because it stops their momentum. So they think it's funny to be sarcastic? Pretend like they didn't say anything at all and carry on like normal. Or if you want to play their game, take what they said literally, tell them how absurd the idea is. Then when they say, "I was being sarcastic", you can smile back and say "So was I".
I don't find it as a particularly useful way for getting back at bullies. You can say all the things you want, and it's funny if bullies either don't hear you or understand you. It feels good. But it doesn't stop them from bullying you, and the hurt doesn't go away. It comes back. You need more than sarcasm to defend yourself if that's what you do to handle it. If you use sarcasm too much in this way, you're only using it to serve yourself. You might even become so used to it that others will see you as someone who's cynical and mean-spirited. They won't be able to see that you're alone, or that you're hurting.