Amid the ghosts and ghouls spooking trick-or-treaters this week, there is something even more terrifying to their parents: sugar.

Research into candy and children helps explain why they love it and, despite some contradictory theories, offers a few guidelines for this time of year.

Children may be more partial than adults to sugar because of the way their taste buds are clustered. "Children have the same number of taste buds as adults, but their tongue is a whole lot smaller, so the flavors are more intense the younger you are," says Brian Wansink, director of Cornell University's Food and Brand Lab, which researches why we eat what we do. "That's why little kids don't like bitter foods and really like sweet foods. The effect is magnified."

Americans eat far more added sugar—white sugar, brown sugar, corn syrups and honey, among others—than is recommended. The average person consumes 22 teaspoons of added sugar a day, or 355 calories. Boys, ages 14 to 18, take in 34 teaspoons, or roughly 550 calories, according to the American Heart Association. Researchers say children and teens should follow recommendations for adults of no more than 9 teaspoons a day for men and 6 teaspoons for women.

U.S. government dietary guidelines use a different system, recommending that added sugars and solid fats combined, the so-called discretionary calories, should make up no more than 15% of a daily diet. However, kids and teens on average exceed this level from added sugars alone, which account for 16% of their daily total calories, according to a recent report from the Centers for Disease Control and Prevention.