From Longman Dictionary of Contemporary Englishif you know what’s good for youif you know what’s good for youused in a threatening way to tell someone to do something or something bad will happen to them Do as he says, if you know what’s good for you! → good
Examples from the Corpus
if you know what’s good for you• If you know what's good for you, you'll do what I tell you.• You'll just keep your mouth shut about this if you know what's good for you!if you know what’s good for youif you know what’s good for youTHREATENused to tell someone that they should do something, or something bad will happen You’ll keep your mouth shut about this if you know what’s good for you! → know