What it means
A classic British brush-off for when someone's chatting absolute rubbish, making a daft claim, or asking for something with a straight face that deserves nothing but a hard eye-roll. Nobody wants an actual favour. It means come off it, give over, or don't take the piss.
Usage examples
"Do me a favour, there's no way that old banger does a hundred miles an hour."
"You reckon you ran it in under five minutes? Do me a favour."
"Do me a favour, mate, you did not pull a sickie and end up at the pub by lunch."
"He says he's never seen the message. Do me a favour, he was online five minutes ago."
"Do me a favour, you did not accidentally text your ex at two in the morning."
Where it comes from
Plain words turned inside out by tone. The literal request to do me a favour got so loaded with sarcasm that the dismissive reading took over, until barking it at someone became pure disbelief rather than any actual ask.