I think there are three ways in which those who write for children may approach their work; two good ways and one that is generally a bad way.
I came to know of the bad way quite recently and from two unconscious witnesses. One was a lady who sent me the MS of a story she had written in which a fairy placed at a child's disposal a wonderful gadget. I say 'gadget' because it was not a magic ring or hat or cloak or any such traditional matter. It was a machine, a thing of taps and handles and buttons you could press. You could press one and get an ice cream, another and get a live puppy, and so forth. I had to tell the author honestly that I didn't much care for that sort of thing. She replied, 'No more do I, it bores me to distraction. But it is what the modern child wants.' My other bit of evidence was this. In my own first story I had described at length what I thought a rather fine high tea given by a hospitable faun to the little girl who was my heroine. A man, who has children of his own, said, (Ah, I see how you got to that. If you want to please grown-up readers you give them sex, so you thought to yourself, "That won't do for children, what shall I give them instead ? I know ! The little blighters like plenty of good eating."' In reality, however, I myself like eating and drinking. I put in what I would have liked to read when I was a child and what I still like reading now that I am in my fifties.
The lady in my first example, and the married man in my second, both conceived writing for children as a special department of 'giving the public what it wants'. Children are, of course, a special public and you find out what they want and give them that, however little you like it yourself.
If you are interested in learning what he says about the good ways to write for children you can read on, here.