Books that were written for children, historically, were either religious in nature or books to teach, or both. The concept of books that would be entirely for the entertainment of a child were not published until the mid-1700’s, and even then, most books for children remained dogmatic in nature until the early 1900’s.
Please note that these particular publishing trends I am writing about are from America and Europe through I will add the information that I have about books from around the world.
The very first book that was published as a novelty for children was by John Newbery, who was a publisher in London (and for whom the children’s literary prize Newbery Awards takes its name).
A Pretty Pocket Book, 1744 Here is a link to see more of the book at the British Library
(This is also the first mention of the game of baseball, for all aficionados out there)
But it was not until the 1800’s that ideas first promulgated by John Locke were allowed to come to fruition, with the ability of printers to print books cheaply, and with the advent of illustrations from woodblock engravings and chromolithographs.

Chromolithography (the printing from stones) was really only in use in the mid to late 1800’s, just in the same period as the boom of children’s books. The colors are like rich oil colors- and some of the print, also used for advertising labels- were vibrant and evocative, and suited the colorful world of the illustrated books. For some more information about the techniques of chromolithograhy- please see links.
These are the illustrations of a Victorian childhood- and still popular, and often reprinted today.

For the first time in many hundreds of years, there was a time and a place for a child to be a child- not for everyone of course, there were many who were sent to work early and did not get lovely books as gifts- but now that printing was profitable, and there was a market for books, even a poor child might get to have a copy of a book with illustrations, and stories that had been only passed down orally, were now collected and printed and shared with tens of thousands.

Jack and the Beanstalk
Fairy tales have been popular in print for hundreds of years. In France in 1697 both Charles Perrault’s story collection as well as Catherine-Anne d’Aulnoy’s Les Contes des Fee’s (Tales of the Fairies), were published. The Brothers Grimm’s first edition of collected folktales came out in 1812, Kinder und Housemarchen Children’s and Household Tales, with 186 stories. The standardized updated edition in 1857 with 210 tales, and has been in print ever since.