According to the New York Times, "candy before exercise can enhance performance, but only to a point."
I've heard stories of swimmers eating Jello powder and honey before a swim. There's even a rumor that frozen York peppermint patties can give you a better boost than any other candy.
Still, sugar from candy is probably just as effective as sugar from an apple. At least with the apple you get some added nutrients (but, I guess it's probably not as tasty as the York).