To express delight that something went awfully wrong for someone (they might have had it coming to them or deserved it in someway, or you might dislike them). For example if an insult they used backfired.
Used to describe anything good!! can be used for something bad but generally good!! similar words are class.. deadly it is also used to agree with a question or just answer with stout!!