The day I realised the potential of the internet was infused with wonder – not at the network itself, however handy it would become for shovelling bits, but at what it revealed as I crowded round a screen with the other staff of Nature magazine on 16 July 1994. That was the day when the first piece of Comet Shoemaker-Levy 9 smashed into Jupiter, turning our cynicism about previous astronomical fireworks promised but not delivered into the carping of ungrateful children. Right there on our cosmic doorstep bloomed a fiery apocalypse that left an earth-sized hole in the giant planet’s baroquely swirling atmosphere. This was old-style wonder, awe tinged with horror, at forces beyond our comprehension.

Aristotle and Plato didn’t agree on much, but they were united in identifying wonder as the origin of their profession. As Aristotle said, “It is owing to their wonder that men . . . first began to philosophise.” This idea appeals to scientists, who frequently enlist wonder as a goad to inquiry. “I think everyone in every culture has felt a sense of awe and wonder looking at the sky,” wrote Carl Sagan in 1985, locating in this response the stirrings of a Copernican desire to know who and where we are.

Yet that is not the only direction in which wonder may take us. To Thomas Carlyle, wonder sits at the beginning not of science, but of religion. That is the central tension in forging an alliance of wonder with science: will it make us curious, or induce us to prostrate ourselves in pitiful ignorance?

We had better get to grips with this question before we too hastily appropriate wonder to sell science. That is surely what is going on when pictures from the Hubble Space Telescope are (unconsciously?) cropped and coloured to recall the sublime iconography of Romantic landscape painting, or the Human Genome Project is wrapped in biblical rhetoric, or the Large Had­ron Collider’s proton-smashing is depicted as “replaying the moment of creation”. The point is not that such things are deceitful or improper, but that if we want to take that path, we should first consider the complex evolution of the relation between science and wonder.

For Sagan, wonder is evidently not only an invitation to be curious, but a delight; it is wonderful. Maybe the ancients, too, felt this; the Latin equivalents admiratio and mirabilia seem to have their roots in an Indo-European word for “smile”. Yet this was not the wonder enthusiastically commended by medieval theologians, which was more apt to induce fear, reverence and bewilderment. Wonder was a reminder of God’s infinite, unknowable power – and, as such, it was the pious response to nature, as opposed to the sinful prying of “curiosity”, which Saint Augustine damned as a “lust of the eyes”.

In that case, wonder was a signal to cease questioning and fall to your knees. The historians Lorraine Daston and Katharine Park argue that wonder and curiosity followed mirror-image trajectories between the Middle Ages and the Enlightenment, from good to bad and vice versa, conjoining symbiotically only in the 16th and 17th centuries – the period, not incidentally, in which modern science was born.

As such, it is no surprise to find that the early prophets of science were uncertain how to manage this difficult emotion of wonder. Francis Bacon accepted it only as a litmus test of ignorance: wonder signified “broken know­ledge”. The implicit aim of his scientific programme was to make wonders cease by explaining them, a quest that began with medieval rationalists such as Roger Bacon and Albertus Magnus. That which was understood was no longer wonderful.

Undisciplined wonder was thought to induce stupefaction. Descartes distinguished useful wonder (admiration) from useless wonder (astonishment, literally a “turning to stone” that “makes the whole body remain immobile like a statue”). Useful wonder focused the attention; it was, Descartes said, “a sudden surprise of the soul which makes it tend to consider alternatively those objects which seem to it rare and extraordinary”. If the “new philosophers” of the 17th century conceded wonder at all, it was as a source of admiration, not debilitating fear. The Northern Lights might seem “frightful” to the “vulgar Beholder”, wrote Edmond Halley, but to him they would be “a most agreeable and wish’d for Spectacle”.

Others shifted wonder to the far side of curiosity – something that emerges only after the dour slog of study. In this way, wonder could be channelled dutifully away from the phenomenon and turned into esteem for God’s works. “Wonder was the reward rather than the bait for curiosity,” write Daston and Park, “the fruit rather than the seed.” Only after he had studied the behaviour of ants to understand how elegantly they co-ordinate their affairs did the 17th-century Dutch naturalist Jan Swammerdam admit to his wonder at how God could have arranged things thus. “Nature is never so wondrous, nor so wondered at, as when she is known,” wrote Bernard Fontenelle, the celebrated secretary of the French Academy of Sciences. This is a position with which most modern scientists, even those of a robustly secular persuasion, are comfortable: “A knowledge of science only adds to the excitement and mystery and awe of a flower,” wrote the physicist Richard Feynman in 1988.

This kind of wonder is not an essential part of scientific practice, but may constitute a form of post hoc genuflection. Generally, it is informed wonder that science aims to cultivate today. The medieval alternative, regarded as ­ignorant, gaping wonder, was and is denounced and ridiculed. That wonder, argues the literary historian Mary Baine Campbell, “is a form of perception now mostly associated with ­innocence: with children, the uneducated (that is, the poor), women, lunatics and non-western cultures . . . and, of course, artists”. Since the Enlightenment, Daston and Park concur, uncritical wonder has become “a disreputable passion in workaday science, redolent of the popular, the amateurish and the childish”. Understanding nature was a serious business, requiring discipline rather than pleasure, diligence rather than delight.

Descartes’s informed and sober wonder re-emerged as an aspect of Romanticism, whether in the Naturphilosophie of Schelling and Goethe or in the passion of English Romantics such as Coleridge, Shelley and Byron, who had a considerable interest in science. Now it was not God but nature herself who was the object of awe and veneration. While 18th-century natural theologians such as William Paley ­discerned God’s handiwork in the minutiae of nature, the grander marvels of the Sublime – wonder’s “elite relative”, as Campbell aptly puts it – exposed the puny status of humanity before the ungovernable forces of nature. The divine creator of the Sublime was no intricate craftsman who wrought exquisite marvels, but a force that worked on a monolithic scale, with vast and inviolable laws. He (if He existed at all) was an architect, not of profusion, but of a ­single, awesome order.

Equally vexed during the ascension of science was the question of what was an appropriate object of wonder. The cognates of the Latin mirabilia – marvels and miracles – prove that wonder was usually reserved for the strange and rare: the glowing stone, the monstrous birth, the fabulous beast. No common flower would elicit awe like Feynman’s; it would have to be misshapen, or have to spring from a stone, or possess extraordinary curative powers. This was a problem for early science because it threatened to misdirect curiosity towards precisely those objects that were least representative of the natural order. When the early Royal Society sought to amass specimens for its ­natural history collection, it was frustrated by the inclination of its well-meaning donors throughout the world to donate “wonderful” oddities, thinking that only exotica were ­worthy gifts. If they sent an egg, it would be a “monstrous” double-shelled one; if a chicken, it would have four legs. What they were supposed to do with the four-foot cucumber from one benefactor was anyone’s guess.

This collision of the wondrous with the systematic was evident in the botanist Nehemiah Grew’s noble efforts to catalogue the society’s chaotic collection between 1678 and 1681. What this “inventory of nature” needed, Grew grumbled, were “not only Things strange and rare, but the most known and common amongst us”. By fitting strange objects into his complex classification scheme, Grew was attempting to neutralise their wonder. Underlying that objective was a growing conviction that nature’s order (or was it God’s?) brooked no exceptions. In earlier times, wondrous things took their significance precisely from their departure from the quotidian; monstrous births were portents, as the term itself implied (monstrare: to show). Aristotle had no problem with such departures from normal laws – but precisely because they were exceptions, they were of little interest. Now, in contrast, these wonders became accommodated into the grand system of the world. Far from being aberrations that presaged calamity and change, comets obeyed the same gravitational laws as the planets.

There is perhaps a little irony in how, even as they attempted to distance themselves from a love of wonders found in the tradition of collectors of curiosities, these early scientists discovered wonders lurking in the most prosaic and unlikely of places once they were examined closely enough. Robert Hooke’s Micrographia (1665), a gorgeously illustrated book of microscopic observations, was a compendium of marvels equal to any fanciful ­medieval account of journeys in distant lands.

Under the microscope, mould and moss became fantastic gardens, lice and fleas were transformed into intricate armoured brutes, and the multifaceted eyes of a fly reflect back ten thousand images of Hooke’s laboratory. Micrographia shows us a determined rationalist struggling to discipline his wonder into a dispassionate record.

Stern and disciplined reason triumphed – it came to seem that science would bleach the world of wonder. Thence the disillusion in Keats’s “Lamia”:

. . . Do not all charms fly

At the mere touch of cold philosophy?

There was an awful rainbow once in heaven:

We know her woof, her texture; she is given

In the dull catalogue of common things.

But science today appreciates that the link between curiosity and wonder should not, and probably cannot, be severed, for true curiosity – as opposed, say, to obsessive pedantry, acquisitiveness or problem-solving – grinds to a halt when deprived of wonder’s fuel. You might say that we first emancipated curiosity at the expense of wonder, and then readmitted wonder to take care of public relations. Yet, in the fear of the subjective that characterises scientific discourse, wonder is one of the casualties; excitement and fervour remain banished from the official records. This does not mean they aren’t present. Indeed, the passions involved in wonder and curiosity, as an aspect of the motivations for research, are part of the broader moral economy of science that, as Lorraine Daston says, “cannot dictate the products of science in their details [but is] the framework that gives them coherence and value”.

Pretending that science is performed by people who have undergone a Baconian purification of the emotions only deepens the danger that it will seem alien and odd to outsiders, something carried out by people who do not think as they do. Daston believes that we have inherited a “view of intelligence as neatly detached from emotional, moral and aesthetic impulses, and a related and coeval view of scientific objectivity that brand[s] such impulses as contaminants”. It is easy to understand the historical origins of this attitude: the need to distinguish science from credulous “enthusiasm”, to develop an authoritative voice, to strip away the pretensions of the mystical Re­nais­sance magus who acquired knowledge through personal revelation. We no longer need these defences, however; worse, they become a defensive reflex that exposes scientists to the ­caricature of the emotionally constipated boffin, hiding within thickets of jargon.

They were never really like this, despite their best efforts. Reading Robert Boyle’s account of seeing phosphorus for the first time, daubed on the finger of a German chemical showman to trace out “Domini” on his sister’s expensive carpet in Pall Mall, you can’t miss the wonder tinged with fear in his description of this “mixture of strangeness, beauty and frightfulness”.

That response to nature’s spectacle remains. It is easy to mock Brian Cox’s spellbound admiration on television as he looks heavenward, but the spark in his eyes isn’t there just for the cameras. You have only to point binoculars at the crescent moon on a clear night, seeing, as Galileo did, the sunlit peaks and shadowed valleys where lunar day becomes night, to grasp why there is no need to manufacture a sense of wonder about such sights.

By frankly acknowledging wonder – admitting it not just for marketing, but into the very inception of scientific inquiry – it might be possible to weave science back into ordinary experience, to unite the objective with the subjective. Sagan suggested that “by far the best way I know to engage the religious sensibility, the sense of awe, is to look up on a clear night”. The biographer Richard Holmes locates in wonder a bridge between the sentiments of the Romantic poets and that of their scientific contemporaries.

Science deserves this poetry, and needs it, too. When his telescope showed the Milky Way to be not a cloudy vapour, but “unfathomable . . . swarms of small stars placed exceedingly close together”, Galileo already did better than today’s astronomers in conveying his astonishment and wonder without compromising the clarity of his description. Yet look at what Milton, who may have seen the same sight through Galileo’s telescope in 1638 when he visited the old man under house arrest in Arcetri, made of this vision in Paradise Lost:

A broad and ample road, whose dust is gold,

And pavement stars,– as stars to thee appear

Seen in the galaxy, that milky way

Which nightly as a circling zone thou seest

Powder’d with stars.

Not even Carl Sagan could compete with that.

Philip Ball’s “Curiosity: How Science Became Interested in Everything” was published by the Bodley Head on 17 May