I always have a small zip-lok baggie with assorted Jolly Rancher candies in my little cook pot kit. Not only can the candies help stave off a low blood sugar situation, but they can also be a moral booster, too. I broke out the baggie at a rest stop during a hike a few weeks ago, and my two companions were delighted and eager to pick a few out. I think the occasional hard candy can also encourage water consumption in those who tend to not drink as much as they should.
For a diabetic situation, they will help combat a low blood sugar situation if the diabetic is aware of their problem in advance. The sugar in hard candies needs to be broken down and processed before the brain can use it. I do carry a few tubes of oral glucose in my first aid kit, which is faster acting and more beneficial if someone is really bonking. Oral glucose can be picked up without a prescription in gel and tablet form at your local pharmacy. Just something to think about.
After re-reading the original post, I will say that I do not take along hard candy as a body energy source. I look at it more as brain fuel, as it is sugar that powers the brain. I don't ever see myself pounding piece after piece of candy in order to survive. Maybe one here, one there, maybe two here, and so on. Ingesting one or two Jolly Ranchers aren't going to give me much of a sugar high. Now that I think about it, I usually do not have much with me as far as sweets go when I hike or camp. A Powerbar will probably be the highest sugar item I carry. Yes, those do have a lot of sugar.