Some libraries have an email or snail mail form you can send in to request that the library purchase a certain book or periodical.
If you are interested in selling a particular book to a library, it makes the most sense to call their Head of Acquisitions or Head of Collections to see if they have the book, or even want it.
If the library or organization has more than 500,000 volumes, and many large libraries and universities do, you might want to search for a subject specialist or bibliography for the subject you want to sell to them.
If you want to find out what library has what books you can go to the library and look at their shelves, or you can go to their websites and check their inventories, though they are not always up to date. Another source is worldcat.org, which “Connects you to the collections and services of more than 10,000 libraries worldwide.” They list books, music, CDs, and videos and digital versions of antiquarian items not available to the general public. They also have a direct link to a librarian so you can ask questions.
All in all, there are a number of ways in which to glean new customers from libraries and other societies. It just takes that good old hard work of searching for the sources, contacting them by email, snail mail or telephone, or putting together a catalogue of books you think they might like and sending it. But, once you’re in with a source and you offer good books they want, then you’ll probably be their vendor for a long, long time.