Lying and stealing are normal behaviors at that age, especially in boys. Also normal in humans is a propensity for sweets. As adults, we eat what we want, but little ones often need permission, which is, well, irritating when one really wants sweets. *If a child that age knows where the sweets are, can reach them, and is unsupervised for long enough, they will eat sweets, lacking the amount of self-control and moral development to avoid doing so.
Kids as young as 3 lie to avoid unpleasantness.
Where do you store your sweets? It doesn't have to be a discipline/self-control/hiding thing if he doesn't have access to them. Keeping them out of reach until they are more trustworthy is an easy solution.
I need some advice...
Your cultural background matters. People tend to parent as they were parented if they believe their parents did it correctly and those around them support that kind of parenting.
Authoritarian parents tend to expect more from a child than is developmentally appropriate, and will punish the little thief. Living in an environment where authoritarian parenting is the norm will certainly present a parent with more frustration and feelings of helplessness/failure than necessary when little ones do what little ones do.
Authoritative parents will understand developmentally appropriate stages, will communicate their concerns, discipline (not punish) if deemed necessary, and generally will be more understanding of the moral failings of the little thief.
Permissive parents impose fewer rules on their children, and probably wouldn't post this question here because they would be much less likely to forbid sweets. They would certainly address the up- and downsides of eating sweets now and again, and let the child do what he wanted, no thievery involved.
Unparents/uninvolved parents tend not to care too much about what their child does, and might not have discovered a stash of sweets under the little thief's pillow, though if there was no rule against taking and eating sweets, the little child wouldn't be a thief.
This is a spectrum; you might be somewhere between these classifications. So what you do depends on what you believe.
As someone who practiced an authoritative with-a-bit-permissive parenting, I would have a discussion with my child seeking their input on what they think should be allowed regarding sweets in general, would ask age-appropriate questions ("What might happen if you ate all the sweets you wanted? What else? Is there anything that's not good about eating just sweets?" Etc.) reach some sort of age-appropriate compromise with some input on consequences of disregarding the agreed-upon "compromise/contract", write it out on a post-it note with the child observing, stick it on the refrigerator, and the next time the little person took sweets inappropriately, I would fetch the post it-note, read it emphasizing the consequence, discuss alternatives the child had to taking the sweets surreptitiously and finally enforce the consequence with patience, understanding, and most of all the assurance of love and respect for a child's normal feelings.
What you do is completely up to you. Parenting is hard work (but mostly a joy!) with most parents believing they are failures at it from time to time (and again).