The expression is not just for children. For example: “Hai sempre fatto il bravo ragazzo” = “You have always been the good guy”. But I understand now that the expression has more the meaning of “playing the role of”. So “Tu fai il bravo cuoco” would really mean: You are being “the good cook”, which is different from simply complementing someone for being “a good cook”. Similarly “Fai la brava ragazza” is naturally translated: “Be a good girl” but would more literally be translated: Be “the good girl”, or “Try to act the part of a good girl”.
You would say "bravo", when someone is good, skillful or clever at something. You would use a different word for a negative sentence. You might want to soften the blow with the polite form, unless it is a close personal friend.
You are not a good cook. "Lei non è un buon cuoco." "Tu non sei un buon cuoco."
You are not a skillful cook. "Lei non è un cuoco abile." "Tu non sei un cuoco abile."