Impact of sugar

I am hoping to understand what exactly happens hormonally when I eat a sugary item like a piece of candy. I have been sneaking candy in between meals. This started when I reached my goal weight. I notice I am cheating on myself more and more and because I don’t gain a lot of weight doing this, I am thinking that I am getting away with it. I know for a fact that I don’t feel as well when I do this and it lowers my opinion of myself. For some reason, I feel like if I understand what is actually happening and how this is harmful or interfering with maintaing my goal weight it will help me to stop this behavior. Thanks for your help.