The 2011 Nobel prize for physics was recently given to Adam Riess, Brian Schmidt and Saul Perlmutter for working out that the universe's outer reaches are accelerating away from us. As Martin Rees has pointed out, were it not for the rules that limit the number of Nobel winners to three, the prize could equally have been bestowed on the huge collaborative effort of which they are figureheads.

Science is increasingly dependent on large-scale collaborations. The Large Hadron Collider and the human genome project, for example, bring together hundreds of researchers from universities in dozens of countries. Individual genius plays its part, but science has always been a team sport. Scientific knowledge is, at least in theory, cumulative, collective and accessible to all. Michael Nielsen is an advocate of open science – of networking, collaboration and the sharing of data. And he expresses great frustration at the obstacles in the way of greater openness, many of them put there by scientists themselves. The magnificent achievement of the scientific revolution in the 17th century was to align scientists' self-interest with the common good. Now, according to Nielsen, that alignment is no longer in place. He wants a change – scientists need to get their act together.

Science has spent 90% of its professional life leading the charge towards openness, often against the wishes of individual scientists. Nielsen describes how Galileo, observing the rings of Saturn, was eager to claim credit but reluctant to explain all until he had conducted further research. He wrote a letter to his competitors, including Johannes Kepler, in which he inserted an anagram. Kepler's paymaster, Holy Roman Emperor Rudolph II, demanded of the Medicis, who were supporting Galileo, that he come clean, at which point Galileo unjumbled the text to reveal his insight. The cycle of publication, recognition and reward became more efficient with the creation of scientific journals. Scientists needed encouragement at first before they divulged their findings, but the journals created a system in which knowledge could be shared and credit could be attributed.

Science in the 21st century is a victim of more than three centuries of its own astonishing success. It now finds itself struggling to catch up with the general trend in society towards openness. The web has had a far greater impact on everyday life than on scientific research. The more public access to information improves, the more absurd it seems that much of the web's most reliable and useful information is inaccessible. In a decade, Wikipedia has blossomed into almost 20m articles, while scientific papers, many of which have been publicly funded, are locked away from view by their publishers. If you are a scientist at a university rich enough to grant you access to a complete set of scientific papers, you will still find that the data behind those papers can be difficult or impossible to extract from its owners.

Nielsen is one of a growing band who believe that there is a mine of untapped knowledge online. He describes the potential of the "semantic web", built from data rather than words, and explains how information scientists are starting to detect new patterns in this data. This is how Don Swanson, with no medical training, discovered a link between migraines and magnesium. It is how Google is able to track the spread of flu by analysing search terms and to translate our web pages using its vast quantities of linguistic data.

The argument for openness is not just one of efficiency. It is also about science's social standing. The scientists behind the human genome project, led by John Sulston, conquered their own proprietary instincts to demand full publication of all genome data. Data for the flu virus, however, is fragmented and guarded. So while Google roars ahead, epidemiologists struggle to track and combat flu infections.

Nielsen's anger is palpable: "We have an opportunity to change the way knowledge is constructed. But the scientific community, which ought to be in the vanguard, is instead bringing up the rear." His prescription is pragmatic, more carrot than stick. Force scientists to share and they will share badly; give them incentives to do so and they will see its value. He describes some design principles for open science that explain why efforts such as Tim Gowers's Polymath project have been such a success (27 mathematicians co-operating online took a month to prove a theorem that had baffled individual mathematicians), while others have become online ghost towns.

Nielsen is a physicist, and was a wunderkind of quantum computing, before he took leave under George Soros's patronage to write this book. At times he betrays a physicist's naivety about the complexity of knowledge. He is happier discussing amateur stargazers and online chess games than recent bust-ups over the MMR vaccine and "Climategate". In the life sciences, data is often messier, stakes are often higher and much of the knowledge that needs to be shared may be tacit, impossible to write down and expensive to share. For biologists, intellectual property increasingly chokes the free exchange of ideas. But this must not become an excuse for inaction.

Science has progressive ends, but conservative means. Scientists see their methods as the root of their authority and they guard them jealously. Nielsen asks scientists to reinvent what they do, for the good of science and the good of society. His call to arms is timely and important.