Ayn Rand’s Atlas Shrugged, one of the cornerstones of Objectivism, would by most any standards be considered a book of science fiction. Robert Heinlein’s The Moon is a Harsh Mistress is, among other things, a case study of a libertarian society. Jerry Pournelle claims credit, along with frequent collaborator Larry Niven, for much of the initial push for Reagan’s Strategic Defense Initiative. So is science fiction a literature of the political right? I confess that I hadn’t given this question much thought until it was raised by Rob Drimmie, who felt that it was self-evident that science fiction was right-leaning. If you go back to the roots of science fiction — not as far back as Frankenstein, mind you — science fiction was usually markedly leftist. This tendency is perhaps best represented by H. G. Wells‘ alegorical critique of late Victorian society, The Time Machine. (Readers seeking surrealist fun may wish to try combining The Time Machine with the Revelation of St. John using the Markov toy.)
Wells was a member of the Fabian Society, the group founded by George Bernard Shaw (whose Lamarckian play Back to Methuselah is considered to be science fiction by at least one person. (It’s worth noting that the marvelous E. Nesbit, children’s fantasist and author of Five Children and It and The Wouldbegoods, was also a Fabian.) In America, Hugo Gernsback‘s Amazing Stories began publishing in 1926, turning out, among other things, the kind of science fiction — with their gleaming supercities, omniscient world governments, meal pills, men in togas, and leaden prose — that Woody Allen mocked in Sleeper. For an example of this type of writing, check out Harry Stephen Keeler’s 1914 story "John Jones’s Dollar". (Do check it out. I found the Harry Stephen Keeler Society via Evil Eye artist Richard Sala‘s bookmarks page, and it is reeeeee-markable. Spend some time poking around.)
Rob’s assertion was that science fiction heroes are usually rebels fighting an entrenched authority, and that this authority is usually the government. I’ll happily grant Rob the point when it it comes to television and movies, but I just don’t think the idea holds up when you examine the full spectrum of s.f. prose (although I think there’s been a shift to the right in science fiction, as in so many things, in the last twenty-five years). If you accept the plot Rob describes as one of the most common in science fiction, you have to consider that another all-too-common plot involves big, bad aliens whom the representatives of the sterling and blameless government must fight. And that’s only space opera! Science fiction is often Utopian, although dystopian stories are now perhaps more common. Atlas Shrugged and Charlotte Perkins Gilman‘s Herland or Edward Bellamy’s Looking Backward spring from precisely the same impulse: to describe a more perfect society through the device of imagining a society which does not (and, in most cases, could not) exist.
I think it’s fair to say that most contemporary science fiction celebrates the individual over the collective. (That’s not always the case, of course, and it’s a pretty poor depiction of how most contemporary science works, but we’re going for broad strokes here.) And if you define celebrating the individual rather than the collective as "libertarian," then I suppose much of contemporary s.f. is libertarian.
But there are countertrends. Ignoring obvious early counterexamples (such as Ursula LeGuin’s The Dispossessed, one of my favorite works of science fiction, which is an examination of what an anarchist society might look like and the factors that would enable it to survive like a hothouse flower; it’s also an examination of how Utopia generally turns out to be anything but and of the quite possibly self-defeating nature of such a system), there are trends towards books in which property is somehow not really necessary (see Iain Banks‘ Culture novels) or government is a largely benevolent force (Greg Bear‘s Slant; Bruce Sterling‘s Distraction). Indeed, this sympathy for authority is one of the things that I think defines post-cyberpunk science fiction. (By "sympathy for authority," I don’t mean "authoritarianism," although that’s certainly a charge that can be levelled against much science fiction. Michael Moorcock’s "Starship Stormtroopers" screed seems an appropriate thing to mention here.)
So I’m not prepared to concede the question. Although I’m only passingly familiar with the work of Ken MacLeod, anyone described by Salon as a "Trotskyite libertarian cyberpunk" is worth looking into. And all-knowing librarian Jessamyn has pointed me towards an anarchist science fiction discussion list (apparently one need but mail majordomo at tao.ca with the message "subscribe anarchysf <your email>" to subscribe). I suppose more research needs to be done — and what a chore that will be, given how much I hate to read science fiction.