Ilya Somin asks some interesting questions over at Volokh about Star Trek's political system. He says that
Star Trek's Federation (or at least Earth) is definitely socialist by the time of the New (Next, actually -- Hube) Generation series, and probably the time of the original series that focused on the Enterprise commanded by Captain Kirk. By "socialist," I mean an economy where all large enterprises are controlled by the government, not merely a market economy where there is regulation or a welfare state.
It well worth reading the many reader comments under the article because Somin ignores (not deliberately, IMO; just that he has limited space to cover so much material) just how the world had changed by the time of the Federation's founding. In other words, can we really apply terms like "capitalism" and "socialism" when, by the time of Capt. Kirk, humanity has solved one of -- if not THE -- major problem(s) it has ever faced: the need for unlimited, cheap energy. Earth of the 23nd century not only has cheap fusion power, but power generated by matter-anti-matter reactions (this powers Federation starships' warp drive). When power is unlimited, it's inherently cheap. Once this problem is solved, I believe it's only a matter of time for the economic system to change.
There's enough references in Trek to note the evolution of the Federation economic system despite the various series ignoring the topic outright. We know that some sort of currency was used in the era of "Enterprise" as well as the TOS. However, Kirk makes several references to "not using money anymore" by his time (see "The Voyage Home" for one notable instance). Personally, since replicator technology wasn't widespread until the Picard era (some 80 years after Kirk), I find it more difficult to grasp a "no currency" economy in Kirk's time. Although power is unlimited (and thus, cheap) in the 23rd century -- as is transportation, since the transporter is widely in use by this time -- myriad goods and services would still need to be produced ... and sold. The replicator, by the 24th century, would revolutionize this need. Food and innumerable goods could be produced with the mere push of a button.
Just try to imagine how replicator tech would transform society. Who would even need to work? Power is free, and with that, virtually all needs like food, clothing and shelter are thus, too. Automation would likely serve to maintain needed infrastructure (like fusion or matter-anti-matter power plants, water treatment systems, etc.). Which then would beg the question who would then have any motivation to better human society even further? Capitalism's profit motive is, well, a powerful motivator. It serves to drive the average person but more importantly the [way-]above average person -- the doctor, the scientist. But what would motivate these folks if all their personal needs are met (and then some)?
Somin (or one of the commenters) posits that perhaps the inherent motivation of [very smart] people would be enough in the Trek future. All their needs met, people with an inherent motivation and curiosity would more easily be willing to study advanced physics or medicine. I suppose one can argue that, with regard to scientists today at least, they already make peanuts in comparison to what they provide society. It's difficult to see the motivation that drives them being altered much by 24th century technology. But would this inherent motivation be enough to maintain the whole of the world government of Earth -- let alone that of the Federation? In other words, why would someone even want to join Starfleet -- knowing of the dangers out there in the galaxy? (Y'know, the Romulans, Cardassians, the Dominion, the Borg ...) Why would someone want to alter their very comfortable existence by zipping off to the unknown ... to possibly be killed?
You may recall the interesting conversation Capt. Picard has with 20th century cryogenic refugee Ralph Oppenhouse in TNG's first season "The Neutral Zone." Ralph is naturally quite skeptical about the Federation's economic and political system while listening to Picard lecture him that humanity is "no longer obsessed with the accumulation of wealth" and that people now concentrate on "improving themselves." Since practically everyone is "wealthy" by the 24th century, perhaps Picard's point should be well-taken: Maybe outright boredom would drive people to travel the stars in Starfleet, or take up the study of physics or medicine.
Somin mentions another aspect of Trek's socialism in that there has never been
... a society that combined full-blown socialism with prosperity or extensive "noneconomic" liberties for the population. And there has never been a transition to socialism without large-scale repression and mass murder. If Star Trek's writers want to posit a new form of socialism that somehow avoids the shortcomings of all previous ones, they should at least give us some sense of how this new and improved socialism escaped the usual pitfalls.
This is a great point; however, in past attempts at "full-blown" socialism there was never incredibly cheap power sources available with all the subsequent benefits. In addition, as noted extensively throughout Trek, Earth suffered its Third World War in the mid-21st century. Hundreds of millions were killed in this nuclear, third, global conflict. The very need to establish some sort of unified world government so that humanity didn't completely wipe itself out would be paramount. (But this, of course, doesn't mean that this unified government had to be completely "socialist" -- and indeed it probably wasn't anyway. Remember Zephram Cochran's words to Will Riker inside the cabin of the Phoenix, Earth's first warp-capable vessel: He developed warp drive not out of any sense of "altruism," but to make a lot of money.) And shortly after WW III, Earth learned that it was not alone in the universe -- "First Contact" shows the Vulcans landing in Montana to make ... well, first contact with humanity. This is a huge "x-factor" that cannot be ignored when hypothesizing about Trek's future economy and politics. After all, the Vulcans subsequently guided humanity in its new post-warp society development right up to the premiere episode of "Enterprise" -- approximately 90 years. It is highly unlikely these most logical beings would be willing to do this if our government was an oppressive, authoritarian regime.
Somin further notes,
Had a similarly prominent pop culture icon been equally obtuse in its portrayal of fascism or even milder forms of right-wing oppression (e.g. - by portraying a rightist military dictatorship that seems to work well and benefits the people greatly without any noticeable loss of personal freedom), it would have been universally pilloried.
Well, this was exactly the case with "Starship Troopers," whose novel is vastly superior to its movie. In the Earth of an unspecified future date, the military indeed runs the world government. But author Robert Heinlein's explanation for how it came about makes a hell of a lot of sense (barely touched on in the film): Military veterans across the planet had become fed up with how the civilian governments treated them after innumerable wars. It started small, but the movement spread. After many years (hundreds?), Earth society had all of the freedoms we enjoyed today in the United States, but only those who had served in the military were able to vote. The reason for this was simple: Only they had the "moral judgment" to better serve society over the individual. The novel neatly interweaves all-out action with complex political pontificating; however, director Paul Verhoeven did just what Somin said above -- he disregarded Heinlein's vision of the "Troopers" society and substituted his own, which was basically a denunciation of such a society as "fascistic." Complete with Federation ("Troopers'" multi-world system was also called this, like "Trek") officers wearing Nazi-like uniforms.
Past Colossus ruminations on Starship Troopers here.
Past Colossus thoughts on Trek government systems here.