I've found a candy box, but I can't open it. What do I need to do? Does it have anything to do with throwing candy on the ground?
Phew, finally finished it. WARNING! Huge spoilers ahead!
To open candy box you need to collect 4 marked stones: P,L,A,Y, as well as proceed to castle and defeat giant nougat monster to place this stones to tower.
After you place them on the tower, you will get talking candy, it's actually a key and end of the game - to get stones you need to (AFAIR):
Y - defeat developer. You can take this quest from the dragon in the castle.
A - defeat Devil in Hell. You can take this quest from the dragon in the castle.
L - you can take this stone from the room in the castle with eggs. Use pogo stick and gravity potion, or unequip all of your weapons so you don't damage the eggs.
P - from lighthouse puzzle, to get this quest you also need to talk with the dragon.