yep you can bring candy as long as it isn't liquid. You cant bring drinks though. I wouldn't suggust bringing chocolate because it could melt in your bag or foods that make a mess, such as pretzels.
I would not recommend it, but the instructions on the TSA website are conflicting. In one place they say you can, and in another they say you can't. Don't take any chances, just put them in your...