He is in my books, or in my good books. The former is the older form; both mean to be in favour. The word book was at one time used more widely, a single sheet, or even a list being called a book. To be in my books is to be on my list of friends.
“I was so much in his books, that at his decease he left me his lamp.” —Addison.
“If you want to keep in her good books, don't call her `the old lady.' ” —Dickens.
He is in my black (or bad) books. In disfavour. (See Black Books.)
On the books. On the list of a club, on the list of candidates, on the list of voters, etc. In the universities we say, “on the boards.”
Out of my books. Not in favour; no longer in my list of friends.
The battle of the books. The Boyle controversy (q.v.). (See Battle.) To take one's name off the books. To withdraw from a club. In the passive voice it means to be excluded, or no longer admissible to enjoy the benefits of the institution. The university phrases are “to keep my name on the boards”; “to take my name off the boards,” etc.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894