I have one children's picture book that is currently published, but I have five children, so I feel like I am justified in talking about some basics when it comes for writing for children. I am going to use my book: Sal, Captain of the Baby Guards, and a middle reader book, Saving Bigfoot Valley, that just got a five-star review from me for examples.
1. Know your audience. Many people writing Indie books for children and think they all have to rhyme. This is false. In fact, unless you are a poet, you really shouldn't rhyme. Many books that I have reviewed in this past year that were rhyming children's books were written by people who used slant rhymes and neglected the meter. Sal, of course, doesn't rhyme. I actually have no desire to write a rhyming children's book. As you move into older age groups (i.e. 8+ is when beginning chapter books should start transitioning into a child's reading diet if not before), rhyming is not going to capture your audience.
2. Unless your book has an upper and lower age limit, do not set it on Amazon. I get it. This feature can help you target your age group in Amazon searches. However, there is a big problem that I have occasionally fallen into: If you set a lower age limit, i.e. 14 years old, the upper limit is sometimes set to 18.
So, if you click to Sal, you will see the age limit of 7-9. I probably should lower that to 3-9, but this works because adults are not going to pick up a picture book to read. Since the topic of the book is a fear of vacuum cleaners, older kids aren't really going to be interested in it either. S.D. Brown's Saving Bigfoot Valley is targeting a specific age group: 9-12 year olds. Since this book talks about body changes during puberty, this is a good age group. One problem would happen if you wrote, say a book like Twilight, which would appeal to 14-year olds, but the top accidentally got set to 18 years. Twilight is a book that appeals to both children and young adults, so you have limited your audience. The other problem would be setting an adult book with adult subject matter to, say 13+, because it was written at a 4th-grade level. In this case, you are identifying your book as fit for children when the subject matter is not. Misidentifying your audience can lead to bad reviews.
3. Including objectionable material in kids books. I list many things as "potentially offensive" in my reviews, including things like "parental disrespect" that some people might not find offensive at all. In this case, though it covers only the biggies: anything other than mild violence, rape (there a limited places where this could be used offscreen in a high school/YA book), any sex (again, offscreen is now okay in YA books, but this subject is touchy, so it's best not handled even in YA), religious topics unless it is a religious book, political topics unless it is a political book, LGBQT+ unless your book is an LGBQT+ book.
Anyone who has read the news, knows that several books are being banned from libraries and other places. Parents ultimately get to decide what their kids read, see, and hear. Inherent in the freedom of speech is the freedom to not listen to speech. If you include objectionable material in your book, you need to inform people about it instead of trying to sneak it under the radar just to sell books. Not telling your audience what they can expect leads to poor reviews and getting your book banned when parents allow their kids to check out a "children's book" only to find out it isn't.
4. Does your theme make sense to the age group?
Just because you make a cartoon filled book, doesn't mean it is for children. If you make an adult cartoon book, you need to make sure that it is clear the audience is for adults. Animal Farm is a book about animals, but it also contains complex sociopolitical themes. It isn't really a book for 5-year olds. Think about what you want to say with your book and about the story you are telling. For younger children, complex explanations about nuclear physics is not appropriate. At the same time, books about everything from birthdays to potty training are in abundance. My son was afraid of the vacuum cleaner, which is why I wrote Sal. I couldn't find any books about that fear. For middle schoolers, the difficulties of going through puberty and books that show good examples of friendship are appropriate, but a book about potty training at this level or where a character gets married would not be. Young Adult books usually have characters who are on their own and out in the world--even if the character is only 16 and technically too young to have to face those things. Some books can appeal to more than one audience, but if you try to do that and fail, you risk getting bad reviews.