That is a very interesting question, and I must say that I am as stumped as you are. Giving candy to a crying girl who had just fallen and hurt her knee, then saying "bu hao" to her does not make a lot of sense to me. If I were the father, I would more likely console her by saying "bu yao ku" (不要哭) ("don't cry"), followed by "la, baba gei ni tang-tang chi" (来, 爸爸给你糖糖吃)("here here, Daddy's going to give you some candy.")
Or you may have heard the last part of "乖宝宝,别哭,好不好“ (guai bao bao, bie ku, hao bu hao"?) ("good little cry, don't cry, okay?")
But the upshot is that I wouldn't say "bu hao" to a little girl who is crying...