Frank R Paul, April 1928 'Eye' cover for Amazing Stories, the world's first science fiction magazine. Photograph: The Estate of Frank R Paul/ The British Library

Nothing provokes nostalgia like the projected futures from our past. There they are, recorded in the pages of Amazing Stories and on strips of celluloid. Jet-pack and warp drive, digital immortality and interstellar travel: science fiction dreams that remind us what we wanted to be when we grew up. Nightmares, too, that linger on into the present and its imagined posterity. The uncanniness of aliens, clones and robots; the implacable mechanisms of surveillance states; the revenge of mutated organisms and wrecked ecosystems.

The history of those science fiction dreams is the subject of Out of This World, a forthcoming exhibition at the British Library. It has a subtitle, too – Science Fiction But Not As You Know It – a playfully pilfered Trekkie catchphrase that also hints at science fiction's ability to expose the strangeness of the world we already live in. Structured around a series of "other worlds" (alien worlds, future worlds, parallel worlds, virtual worlds, "the end of the world" and "the perfect world"), the exhibition covers textual, visual and audio sources ranging from a fictional 2nd-century moon landing to the expanding galaxy of contemporary SF.

As with any dream, think about these visions for long enough and you discern the dreads and desires of waking life, hints and guesses about what might be lurking round the corner of the next decades. Take Tennyson's future-gazing prediction of aerial warfare in "Locksley Hall", a poem written in 1835, or the mechanised battle gear that emerges from the blasted crater in HG Wells's War of the Worlds (1898).

We all know the priapic rocket ships of the golden age; we remember losing ourselves in the techno-picaresque of Jules Verne. But this exhibition reminds us of science fiction's longer pedigree. There has always been a future, of one sort or another.

Going back to those futures entails some awkward questions. What does that oxymoronic genre, science fiction, have in common with science? And what sort of effect, if any, has it had on scientists? The exhibition curators offer a few clues. One, perhaps surprising, highlight is Thomas More's Utopia (1516), a political allegory of an island commune in the New World. Presented as a prototype of the genre, it's a smart inclusion, since utopian impulses still underpin science and science fiction alike: each, in its own way, sets out to question the relationship between the observable, the probable and the possible. As the literary critic Fredric Jameson has pointed out, the visions of science fiction can guide us in imagining alternative futures that resemble something other than an extension of the present with better toys. (Where's my jet-pack? Try: where's my clean fusion power, my eradication of global poverty?)

Although such early texts hint at vague stirrings, not until the 18th century did SF find solid fuel. It was delivered by the great intellectual booster rocket called the Enlightenment, one of whose test pilots, Immanuel Kant, described the two things that most filled him with awe: "The starry heavens above me and the moral law within me." Those are also the poles between which the attention of science fiction roams. From Mary Shelley's Frankenstein to Tarkovsky's Solaris; from the sweeping galactic chronicles of Olaf Stapledon to the mysteries of JG Ballard's "inner space", SF remains the Enlightenment genre par excellence precisely because of its interest in the troublesome relationship between the objective immensity of the universe and the equally immense importance for us, subjectively, of our own inner lives.

What Kant found both in stellar distances and in the mysteries of human consciousness was a sense of the sublime, the wonder that grips the rational mind when it encounters ungraspable vastness. I remember wandering in bookshops as a teenager, fascinated by the covers of books by writers such as Iain M Banks and Robert A Heinlein. Lush pictures of massive spacecraft on interminable voyages. Alien cities lit by dying suns. The art of Michael Whelan, Mark Salwowski and Jim Burns was compelling in ways I didn't understand. I knew nothing about Kant's theories of the sublime, but that was the tradition lying behind those images. The lone wanderers in vast spacescapes were the heirs of solitary figures with alpenstocks standing in the paintings of Caspar David Friedrich and Johan Christian Dahl. Like the books they covered, they evoked a strange hybrid of modern empirical precision and vague Romantic yearning.

That yearning fuels science, while science in turn gives the imagination new things to dream about, making it difficult to distinguish science fiction's influence from its predictions. We carry smartphones that would put Captain Kirk's kit to shame, but the appeal of fictional gadgetry has clearly contributed to shaping their functions and forms, making our mobile phones and tablet computers into perfect simulacra of imaginary technologies.

No less interesting is the vocabulary that science fiction has bequeathed to us. The idea that William Gibson's novel Neuromancer (1984) may have predicted the internet seems less noteworthy than the fact that his word for it – "cyberspace" – spread with viral swiftness, locking in place a set of conceptions about what we do when we use the technology.

Likewise, the universal adoption of Karel Capek's "robot" (from the Czech for "slave" or "serf") encodes a whole, value-laden history of our attitude to machines. It seems significant that we prefer it to "automaton", from the Greek word meaning "self-willed" that earlier writers used for their mechanical creatures. As our computers become more complex, that lexical choice might prove important.

These words are time-travellers, traces of what we once thought the future should sound like. And it does. For that reason, the British Library's exhibition reminds us to look back from time to time at what we looked forward to. We've never needed to rethink the future more than we do now.