an essay about punishment is good for children
Your essay would need to start with a definition of what you mean by "punishment" - a word choice that many may find very uncomfortable, as it may carry connotations of corporal punishment in the sense of physically inflicting pain. If, in fact, your essay will be intended to advocate use of physical pain, through spanking or other means, as being good for children, you may wish to refer to Biblical proverbs:
He who spares the rod hates his son, but he who loves him is diligent to discipline him. (Prov. 13:24) Do not withhold discipline from a child; if you beat him with a rod, he will not die. (Prov. 23:13)
If your definition of "punishment" refers to the need for children to receive guidance in understanding what types of behaviors are acceptable in society and what types are not, then you could refer to any number of behavioral theories and specific methods that can be used to bring about discipline and the development of behavioral understandings within individuals.