A recent article in our local newspaper said that useage of the public libraries here is actually *up* and that it's due primarily to the internet! Web searching of the card catalog, requesting, renewals... all make it easier to use the public libraries and people do.
Perhaps a generation or so hence, they will have a different form, but until everyone can afford to pay for content, there will be public libraries, imo.
(There's also the issue of database owners who only license their information for library use. This is mostly with academic libraries, but it's also true of some for public libraries. Through my public library's web site, I can access quite a few databases, including my personal favorite: the Oxford English Dictionary.)