It's a rhetorical question you say when somebody is on some other shit and/or acting all cocky
"What you just did is morally unacceptable, I'm going to expose you and hope you learn your lesson."
"Who do you think you are, Judge Judy?? LOL."
Get the Who Do You Think You Are mug.