Your friend isn't a very good singer, but he tells you that he's going to enter a singing talent show. He says that he's sure that he'll win first place. You don't think that's possible. You say this under your breath (quietly, so he can't hear).
Yeah, good luck with that.
"Good luck" is a phrase you say to someone to encourage them for something they're going to try to do. Before someone takes a test, applies for a job, or tries to write a novel, you can say:
If you want to specify what you're wishing them good luck with, you can say "good luck on (something)":
Good luck on your job search!
"Good luck with that" is a set phrase that people say when you're going to try something that they think will be hard or impossible.
The literal meaning of "good luck with that" is simply, "I hope that you succeed with that." However, this phrase has become popular to use sarcastically. So it often means "I don't think that you're going to succeed."
Any kind of sarcasm should be used carefully, and only with people who you're close with.
(Print this lesson)