A book can be a puzzle or it can be an experience. If it is an interesting puzzle, and you are the kind that likes puzzles, the puzzle may pull you through to the end. But once you reach the end, the puzzle is solved. There is no reason to read the puzzle again once you know the answer.
An experience, on the other hand, is enjoyable as a whole. If you have a profound experience reading a book, you will want to have that same experience again in the future. More specifically, you will from time to time wish to have that old experience again rather than some new experience that you might get from reading a new book.
I think there are all kinds of discrete techniques for making books that are puzzles. But I think that making books that are experiences is about overall excellence of execution. To date, at least, we have not managed to reduce all human accomplishment to repeatable techniques. Much still depends on tacit knowledge or what we might more vaguely call sensibility. One develops that sensibility, that capacity for excellence of execution, by immersion in the art.
But immersion in the art is not enough either. Lots of people have immersed themselves in the art and not emerged as artists. There is some other ingredient as well. The nearest I can come to naming it is vision. Where that comes from, I don't know. And I wish there was a way to tell if you have it or not, but I don't think there is. (I would really like to know if I have it so I could direct my energies appropriately.) But whatever it is, there is not anything that can be reduced to a repeatable technique.
EDIT: This edit is to capture something that came up in comments to a answer that has since been deleted. We don't always want to reread a book that we thought was good, or even great. Often our reaction is that we want more of the same -- more by the same author, more with the same setting, more with the same theme. It is like going on a scenic drive. You may see a superb view, but you don't loop around endlessly looking at it over and over again. In most cases, you drive on looking for the next great view.
So why do we go back to certain places over and over? Why do we read certain books over and over? A great experience is part of it. We would not go back if it were a lousy experience. But why go back instead of looking for other similar experiences? This is part intuition and part guess, but I think the answer may be comfort.
When we seek adventure, we head outward, towards the new and unknown. But when we seek comfort, we head home, to the familiar. A well loved book is a kind of home, a place of comfort. Different books may be comforting to different people, just as different places are comforting to different people.
Is there a recipe for making a book comforting? I doubt there is. Comforting is not the same thing as comfortable. I have stayed in many comfortable hotel rooms, but none of them were comforting. Home is comforting. Certain books are our literary homes and we return to them for comfort.