Depends upon what the purpose of the book is:
Education - I tend to look for books that are well written and contain clear explanations of the material that is being presented. While you might not be able to understand advanced topics towards the back of the book when you first pick it up, you should be able to read able something towards the front of the book and see what the author is driving at. Since the book is also for educational purposes I also look for a well organized structure that has a gradual progression from the introductory topics to the advanced ones as opposed to just jumping around. Since textbooks tend to be expensive, I also tend to look at what the long term reference value of the book is as well well organized indices are a bonus. So far, one of the best textbooks I've seen in this regards has been Introduction to Algorithms.
Reference - When it comes to reference books I look primarily at the organization of the book, how well written the topics are, and the long time durability of the book. Sometimes you just need a quick reference that you can keep on your desk (e.g. Algorithms in a Nutshell) but there are other times where you are working with an advanced topic and need a full reference that you can pick up and bring yourself back up to date on a topic as well (e.g. Data Compression: The Complete Reference). Unfortunately, when it comes to reference books, it is difficult to say which ones are good or bad without actually picking them up and flipping through them. In some cases, subtle things like not being able to lay the book down flat on my desk has been a bit of an issue for me.