Quite the multifaceted word, snarky. The term generally refers to being irritable or grumpy, but with humorous overtones. You know that mutual friend who grumbles and kvetches about nothing in particular but does it in a vaguely witty and endearing way? She's snarky.
Any literary allusions to Lewis Carroll are coincidental - the word is actually derived from the Dutch/Low German verb snorken, to snore, used colloquially to mean to nag.
The word exists in other forms - snark is the noun form: the product of being snarky, ie lip or sass; snarkily, to say something in a snarky manner, is the adverb; or snarkish is useful as an adjective.
It's possible to push snarkiness (ooh! Another one!) too far as a personality trait, whereupon one crosses the line from snarky to obnoxious.
- - -
Addendum: Cletus the Foetus says re snarky: Where I come from, there are no humorous overtones to this word. The connotations are that the person is being vicious, snappy, and mean.