Things are pretty crazy from the very beginning. James Henry Trotter's parents are eaten by a rhinocerous, he's sent to live with his evil Aunts Spiker and Sponge (one mean and skinny, the other mean and fat), and an old man gives him a bag of magic green crystals that he promptly spills (accidentally) under a peach tree that has never produced a single peach.
When an enormous peach grows from a single limb, James's fortunes begin to change. Instead of being imprisoned by his Aunts and not allowed to play with other children, forced to work all the time, and kept from food, young Master Trotter sets off on a journey in the giant peach with a bunch of eccentric, human-sized insects and a blind earthworm.
Roald Dahl was famously witty and imaginative, and he outdoes himself in James and the Giant Peach. Even without the Caterpillar's absurd poems and 42 boots, this is a hilarious (if sometimes a litte scary) fantasy that kids and adults will both enjoy. One of the best parts is the episode with the Cloud-Men, who paint rainbows, make hail, and operate a giant storm machine.
James is a good boy, thoughtful and intelligent, but fortunately Dahl doesn't make the happy ending a "reward" for the good the boy has done. Sure, he wouldn't have reached New York without pluck and brains, but there's no "do good stuff and good stuff will happen to you" principle.
This is very much like a modern fairy tale. James is the victim of wicked, selfish guardians who aren't his parents, he encounters a magician of unknown identity, makes out-of-the-ordinary friends, goes on a quest, and ends up happy ever after. Dahl's endlessly entertaining tale doesn't have an obvious moral, but his hero is virtuous, even in the face of hardship and persecution.
NOTE: Some parents will want to know that a character uses the word "ass" twice, but it's important to remember that Dahl was British, and in the United Kingdom that term is equal to "moron" or "fool."