There is a shortlist of institutions held in great affection that are increasingly finding that love is not enough. Pubs must be near the top of it. Estimates vary of the rate at which they are failing – some reckon as many as 26 a week – but the sad sight of bricked-up windows and boarded-up doors is a commonplace. There are now, it is said, fewer than there have been since the turn of the last century. High beer taxes, cheap supermarket alcohol, and developers pouncing on old pub buildings on prime sites in the heart of suburbs or villages, all get blamed. But the latest round of criticism comes from the inside, from the pub lovers' annual manual, the Good Pub Guide. It is predicting that as many as 4,000 pubs could close in the year ahead. And it thinks most of them will deserve to go, for it claims too many just aren't good enough.

Our worrying about the state of the pub trade is another way of being anxious about the way we live. Trace the history of the pub and you trace the pattern of attitudes to drink and drunkenness, to public morals and private work ethic. Pubs and publicans have always been licensed and regulated to achieve outcomes that legislators believe desirable: charting their decline over the past 20 years has been one way of lamenting the atomisation of society and the debasing of the communal. When the last Conservative government introduced all-day Sunday opening in 1995, and all-night opening followed 10 years later, it marked the state's retreat from more than a century of Whitehall mothering. Now pubs are businesses like any other and, like all businesses, they thrive on picking up on trends, such as a growing hostility to breathing other people's smoke, or a predisposition to binge, or running a pub that's really an expensive restaurant hiding behind half-timbered charm.

But while licensing legislation tracked the moral panics of the 19th and 20th centuries, when the devastation wrought by cheap gin was driven out by widening access to cheap beer, applying the law was the job of the local magistrates. Local people knew where a pub would be handy, and who was fit to run it. They recognised that pubs served a role that was about more than offering a place for conspicuous or mood-altering consumption. Pubs were not just pubs, but public houses, hostelries, places of hospitality and community. Now, as in other areas where the state once operated as an unobtrusive nanny, there is a backlash against the marketisation of a community benefit. So people are getting together to rescue their local, while the new Localism Act allows pubs to be classified as community assets, which helps fend off predatory developers. Some pubs will close, but others will be restored. It could be that, once more, the pub is holding up a mirror to society.