no question libraries are awesome! i gew up going to the library on a regular basis - checking out books almost each visit and adding books to my collection via the RIF (Reading Is Fundamental) program where you get a free book after you read "x" number of books. it was quite a highlight of my youth! libraries also have storytime - my local one does it only once a month but i love the librarian who chooses the books in my hood! she chooses really great books and reads half a dozen of them. also, she's a GREAT reader!
what puts the library "above" the bookstore is that it has a larger collection of books and "older" books. bookstores often stock the new publication, the bestsellers or those that stood the test of time ($$$) but libraries have a larger collection of books that i read when i was a child.
what puts bookstores a little ahead of libraries however is it's a little more relaxed - no librarians to "shhhh" and you can easily grab a bite or drink at the cafe, which is extremely helpful when your child is fussy! anyhoo, i enjoy taking my little one to both on a regular basis!