Surly describes behavior nobody wants to be around. Think of the irritable old guy who lives on your street and always seems to be simmering with some sullen nasty anger, whose every utterance he spits out with a rude snarl. He's the poster boy for surly.
Surly behavior is always frowned upon, but the word's origins are in the behavior of English nobility. Surly's roots are in sirly, as in sir, meaning arrogant, haughty, and superior. Its current meaning implies all that and more, none of it appealing — rude, snotty, sullen, mean and cranky can be added to the list. Generally speaking, if you find yourself in a surly mood, avoid your friends and loved ones.