I read a lot of books (or at least, bits of books) and so I've learned a lot on how to choose good ones.
Recommendations
My main guiding principle is to read books that have been recommended to me: either personally or by a professional whose work and opinions I already know and respect. The more recommendations a book receives, the more likely I am to read it. For example, I read, "Code Complete" because it was recommended by so many other developers. I am glad that I did.
Names I Already Know
I also tend to choose books by authors whose work I have enjoyed in the past. Two non-programming examples are the works of Steven Covey and John C Maxwell.
Amazon Reviews
As a last-but-one resort, I look at Amazon reviews. Quite apart from their use in choosing books, they are contain very insightful comments on an author's work... as well as numerous - er - "less useful" opinions.
Read the Book
If all else fails, I may even try reading a book to see how good it is. This is easiest where chapters are available for free download, but libraries and even bookshops are OK for a quick flip through before I buy. For example, "Getting Real" by 37 Signals is available free from their website. I downloaded it on the off-chance that it was good. It turns out that it is.
I nearly forgot - there is one other heuristic I use (but not always deliberateley):
Judge by the Cover
Despite the old adage, this actually does work... to some extent.
Notice, for example, the publisher of the book: some publishers seem to be more choosy than others regarding the quality of book that they're willing to be associated with. In my experience the Pragmatic books are generally good, as are many of the O'Reilly ones.
It doesn't matter how good the content of a book if its appearance puts you off reading it. Back in the day I remember receiving "free" technical books with computer magazines. They were invariable printed on poor quality paper in a poor font and with poor binding, so I never could muster up the enthusiasm to read them.
Conversely, if the pages of a book are laid out nicely and if the illustrations are clear then there is hope that the book will be able to communicate its message effectively.