Many fiction books can enrich your knowledge. Fictional stories can still teach you a great deal, about people, places, era's. Well written books can enhance your knowledge of language. Although the events and characters are fictional there can be a lot of reality in the story too.
For non fiction, a good book for me depends on the subject and what I expect to get from it. A good book on something technical for instance, is written in a way that makes you understand the subject. The language can be matter of fact. A good factual book based on history, would again be different for me and depends on why I am reading it, whether it is for study or for pleasure. If reading it for pleasure then I would define a good book as one that is easy to read (as in the words flow well together) and keeps me interested in the subject.
For fiction, a good book can be many different things again for me. Classics have beautiful language, words that are no longer used, and they allow for great use of your own imagination to conjure up the images of the story in your head. If you like, compare it to modern 4k movies, where the image is so vivid and spectacular, and the color pops and the visual effects are amazing, that to me is what Classics are but the visuals are done with language rather than technology.
Crime fiction, good books again are well written, good plots, ones where you get attached or even attracted to the characters because of how they are described and how you picture them in your head. Thrillers where you try predict what happens next but you never expected what comes next. Stories where you just cannot put the book down because you are so invested in knowing the rest of the story.
Good books draw you in, rouses your emotions and leaves you reeling when it's over.