How to teach sweets in moderation

Just like most things, instead of saying "no," just say that you can have some when we ... (think of the next opportunity that you would allow her to have some). And then add that it is not healthy to eat it everyday. Keep it short and simple.

Do the same for playing with something that is not appropriate at that time. Say that you can play with that when .... I think we say "no" way too often and then they just think it is a word that limits their fun instead of there being a reason like safety or health.

Sounds like you are doing a great job!

You're on the right track. Sweets and treats should be "special" food for little people. Only keep on hand what you will allow, and set limits. Maybe Saturday could be a day when you have treats. Maybe one little thing a day with a snack or meal as dessert. Decide what and when, then just keep telling her what the rules are when she asks. "No, its not time for chocolate now. We'll have a piece after dinner," or however you want to space it. Just be calm and specific, and you'll do fine. Birthday parties are a whole other issue of course. If you're there for the party, just keep her to one piece of cake and one scoop of ice cream.

I like Liisa's answer. Making things forbidden attracts some people to that thing like crazy.

First model healthy eating, and focus on keeping healthy things in the house.
Involve your daughter in grocery shopping:

"today we need 3 fruits and 3 vegetables, some bread and cheese from the store..... "

And next time you go buy the fruits and vegetables and ask her to pick a special treat.

Have her help in the kitchen. The kitchen and preparing meals is a great opportunity for teaching!

Setting the stage when young is great! Starting about about 3, I was modeling and talking about eating healthy foods to my kids.

We even started "one soda per week" when they were in Kinder. (I was amazed how many parents would let their small kids drink lots of soda. whoa!)
Now they are all in HS or college and they still drink "one soda a week."
If they are hanging out with friends, and the friends are pounding Pepsi or that horrible Monster, Red bull stuff, they will drink water.
At least for now....I did what I could do while they were growing and their brains were developing.