It's not so much that he's telling lies to you, but that he seems to believe something that isn't true.
It means "I think you are wrong, but if it makes you feel better to believe the thing that isn't true, keep believing."
It's nicer than saying "you're wrong" or "you're stupid/crazy for thinking that."
So, for William's example, you know your friend isn't going to take that girl home - but he's happy imagining he's going to do so. So, you're (nicely) saying "I doubt it. But, I'm not going to say 'She'll never go home with you, you loser. Not in a million years'"