The meaning of the phrase '(To) be in one's good books' is to be in favour of someone.
1. You are always in the good books of the teacher, you can easily get good marks.
2. I am not in the good books of my boss. Therefore, I don't think he would help me.
3. An obedient student is always in the good books of his teachers.