Since I’m rather unlikely to reach for the book on Windows for Workgroups or Red Hat 6.1 they went off to be recycled. My general rule of thumb is that if it’s >10 years old, I probably don’t need it anymore.
One exception to the rule (for example) is a book I have on SQL published circa 1987. It’s still one of the easiest books to navigate (and to a degree, still relevant), and provides really good examples.
There’s also a couple of books on the shelf for nostalgic reasons.
Books which were more like reference (e.g. MFC Library Reference) usually stick around (for reasons mentioned in the other answers), or find other uses (Scott Meyers "Effective C++" is propping up my second monitor so it lines up nicely my first monitor) 🙂
One programmer I worked with a couple of years ago used an old HyperCard book as a monitor stand! Also, I like the idea of sending them to a library. If the library didn’t want it, I assume it would end up being recycled anyway, so it sounds like a good option.
Have you also "re-purposed" your books as monitor stands or something even more devious?