They are, as this piece points out, very popular places to access computers and the Internet, and many libraries offer a wealth of digital content. I can check out and instantly download e-books and audiobooks and movies from my library.
It's certainly conceivable that they might have transitioned less well. There is, after all, a healthy amount of government bureaucracy in the public library system, and that tends to stymie innovation. And then there's just the pain of transition. Bookstores have felt those pains hard; it's not that people don't want content, but they want content in different forms, and a lot of bookstores just couldn't move fast enough.
But I'm really glad to see libraries continue to be generally healthy, and important community resources.