I think it's important for children to learn the difference between right and wrong at an early age as it shapes their personalities and their understanding from an early stage, learning is very crucial at the beginning of their years because it sticks with the child and they never forget what they learned , whenever you want to introduce a hobby or a skill to children they never forget it when they grow up, that's why in Russia they teach ice skating to 5 year olds and they are now world leaders in that sport . However I don't believe in punishment per say, I would rather use the term encouragement, the more you encourage a person to do something the more they will do it better each time and a lot of studies is backing that up now with gentle parenting method etc. In my opinion think it's more effective than punishment.