Great question, and high levels of sugar will absolutely lead to increases in poor behavior - both on the front end and during the withdrawal stage. And often, kids do get snacky-types of foods at school (graham crackers, juices, etc.). Almost invariably though, two things are also happening: (a) schools are leaning away from refined sugars and moving toward more natural snacks, and (b) having a cookie in the middle of the day should not lead to behavior which would make your daughter stand out among the group of kids - many of whom may have also had the same snack.
Here are a couple thoughts to help you weed through the data that you are considering before the doctor visit:
(1) It does not sound like your daughter is hyperactive. If distractability is the only issue plaguing her at school, I would also look at ambient stress in her life. If parents are going through something, if finances are constantly bad, if she is getting picked on... (you get the picture), then stress could also lead to the distractability symptoms.
Too, it does not sound as though she has a learning disability. When kids are struggling with one area of academics (especially if they excel in others), they can grow shameful and drift off.
(2) In some kids who are truly neurochemically ADHD, medications will have paradoxic effects. Benedryl will hype them, up, caffeine may slow them down... it is vexing for parents, but may point toward a true diagnosis.
(3) Don't try to diagnose with things like video games or computer time. Even ADHD kids can bear down and focus on their XBox, regardless of how hyperactive and distractible they are in the rest of their life!
(4) Pay attention to feedback from professionals who work around children a lot. There is absolutely a range of nuttiness among kids - some are naturally more calm, some more active - but teachers, daycare workers, the pediatrician- they tend to have a good handle on that range, and will spot when a kiddo lies way outside of that "normal" range. One swallow does not make a summer, but if the feedback has been mounting, you may want to attend to it.
(5) and lastly... Unfortunately, there does not exist a positive means to definitively evaluate and diagnose ADD or ADHD. You can go online and find some of the behavior checklists that help us to make a diagnosis, but the checklists plus school observations, interviewing teachers, taking a thorough family history, clinical intuition, and (finally, if warranted) medication trials are the best we can do for now.
Take some solace in this: If your doc recommends meds, their nature insures two things: (a) the medicine is in an out of her system very, very quickly. The stimulants are water soluble and do not "hang around" the body, so there will not be a build up or a need to step down; and (b) the teachers/you will know in just a few days if the medicine is moving us in the right direction. Unlike an anti-depressant (for example), these meds do not needs days or weeks to build to a therapeutic level. They will begin to work within twenty to thirty minutes, and some change should be observed.
I wish you luck, I know these are hard decisions for parents to make. If you are satisfied with the response, please hit "Accept." That is the only way I can receive credit for my answer. Thanks-