I've purchased a large number of books online over the past few years. Here are some sites I have found to be useful.
First, of course, is Amazon.com. Amazon's greatest feature is the ability to browse through the largest assortment of books available from one place. Book descriptions, along with editorial and user reviews, category listings, and recommendations of related items make the site a fantastic place to explore, research potential purchases, and discover new items. Usually I go to Amazon first and then buy items elsewhere, because, unfortunately I can almost always get a better deal somewhere else. I don't feel too guilty about it, since Amazon has done some questionable things in the past, such as patenting it's so-called 1-click technology and attempting to charge customers different amounts for the same items based on their shopping frequency.
To find the best price for a given book, go to Best Book Buys, which is a shopping bot for books. It will give you a list sorted by increasing price of whatever book you are interested in, including postage costs.
I find that I get consistently good prices at half.com, which is a site that allows users to buy and sell used books. Books are rated by condition, and sellers are rated through buyer feedback. Amazon offers a similar service, but it tends to be a bit more expensive and it takes me forever to figure out where to go on the site to leave feedback.
For books that are rare and/or valuable, you may not be able to find them using the above services. In that case, go to Abebooks, where you can find nearly anything, although some of the items do tend to be a bit overpriced.
If you still can't find what you're looking for, look it up at the Library of Congress site. If you can't find it there, then it either does not exist, or you have some detail of the title or author's name wrong.
If you no longer remember either the title or author, and you are looking for a children's book, just go to Loganberry Books: Stump the Bookseller. For $2 you can post the details that you remember about the book to the site, where a large community of readers will try to help you identify it. It's worth the money. I have found several forgotten titles that way, and I have found their success rate to be between 90% and 95%.
For author recommendations, try going to Gnod. Just enter your three favorite writers, and the Gnod engine will give you a recommendation based on that input. I tried inputting Robert Heinlein, Robert Charles Wilson, and Ray Kurzweil. Gnod recommended Norma Fox Mazer, who is an author I am familiar with and like, but strangely, her books seem completely unrelated to those of the authors that I listed.
If you get C-Span2, I highly recommend watching Book TV, which airs every weekend and features talks by and interviews of non-fiction writers for 48 hours non-stop.