The excuse for escaping an awkward social moment, boring party, bad day at work, or any other situation you'd rather not be a part of. The intent is to express disdain for the situation - saying you have a dentist appointment when you clearly don't (because it's nighttime, or the weekend, or whatever) amplifies the effect and sarcasm. Synonymous with "this sucks, and I'm leaving".
Used in speech, the dentist appointment can either be how you explain your departure from your current environment, or what you say to someone while giving a recap of the situation and why you left.
Jill: "Hey Matt! Leaving already?"
Matt: "Yeah. Dentist appointment."
Jill: "...but it's 8 p.m. on a Sunday."
"I was trying to watch the movie, but then Sue and Mike started making out, so I had a dentist appointment."
32👍 9👎