The economics of a Star Trek based universe are more than slightly unbelievable. While the most recent references made are that society no longer uses money and the acquisition of wealthy is no longer the driving force in lives of most of those within the Federation, there are numerous on-screen references to currencies of some kind. This makes the economics of the universe a bit uncertain.
Energy Economy
Since such things as the matter/antimatter reactor and cold fusion reactors exist coupled with the presence of replicator technology it is safe to say that the economy of most worlds runs on some form of energy. Energy can be used to produce nearly any goods that an economy might need to operate, from building materials to living materials. Since modern societies operate with an incredibly high capacity to produce energy (matter/antimatter in particular produces a nearly totally mass-to-energy conversion), that leaves most societies in a state of energy surplus, which accounts for the very high standards of living without the focus on acquisition of wealth in most societies.
Fuel
Since the primary source for energy within this kind of economy is not solar, which would of course be free of a fuel source in this context, the most precious commodity in an energy economy is fuel. In the case of the Star Trek universe, the most common fuels are deuterium and anti-deuterium. Fusion reactors run on straight up deuterium, which is a specialized form of hydrogen which has one proton and one neutron in the nucleus rather than just one proton. This allows for the deuterium to be fused together to form helium.
Within a matter/antimatter reactor deuterium is collided with anti-deuterium (it's exact opposite in terms of subatomic particle charge). This is the most efficient means of taking matter and extracting energy from that matter there is for most Federation worlds. It should be noted here, however, that some worlds (such as the Romulan Star Empire) use other methods for converting mass directly into energy, in the case of the Romulan's they use an artificial quantum singularity which converts its mass into high energy plasma.
Replicating Fuel
One might easily conclude that a person could replicate fuel, since most things can be replicated. The problem is that the laws of conservation of energy and matter along with the 2nd law of thermodynamics combine to ensure there is a net loss when creating matter from energy and when converting energy to matter. The process itself, in either case, costs energy. Thus replicating fuel is possible but not cost effective.
In the case of deuterium (hydrogen being the most common element in known space), it is far more effective to gather up hydrogen from space or from world with a high concentration of the substance (such as Jupiter in the Terran system) or worlds that are predominantly water. Antimatter, on the other hand, cannot be replicated safely and must be created from deuterium using subspace manipulation.
Antimatter
Since antimatter is neither abundant nor naturally occurring. According to the Star Trek the Next Generation Technical Manual, antimatter is produced through a vague process involving "charge reversal" devices, resulting in a 24% loss of energy for the process. This makes antimatter one of the most, or the most, precious commodity of fuel for energy generation in known space for races which use it. There are no canonical details on how Romulans create an artificial singularity, so one cannot speculate on what they might consider the most precious fuel commodity.
Dilithium
The reaction between matter and antimatter is regulated through dilithium crystals. Without these crystals the reaction cannot take place in a safe way, thus throughout canonical Star Trek and its various series, movies, and the like dilithium crystals are looked upon as a fuel source. They do get used up, as the reaction breaks down the crystal latices (as explained in Star Trek IV the Voyage Home), Scotty refers to this as them being "drained", which goes along with their place alongside fuel sources. They are a consumable fuel commodity, without which interstellar travel cannot take place using Warp Drive (except in the case of Romulans, though this is not canonical since it is contained in a series of Enterprise novels which are not part of canon, the show does not ever say if dilithium crystals are used by the Romulans).
Currency Economies
Replicator technologies combined with computer advancements make most currency systems obsolete. Money in the forms of coins and bills can replicated with relative ease. To enforce a system of currency requires scarcity of whatever the currency is made of. Gold is no longer usable as it can be replicated, similar for nearly any other substance. In the Star Trek universe, the Ferengi are the most prominent users of currency, as we know it today. Paper currency notes (dollars, pounds, yen) have no real value to them other than what is ascribed to them by the fact that they are so difficult (and illegal) to produce that they then are given value through our exchange of them for goods and services.
Similarly the Ferengi and other races use a currency known as Gold Pressed Latinum. In this, the gold is infused with a substance that is impossible to replicate known as Latinum. The gold itself has value, of course, as it is a heavy element that is difficult to procure naturally, but can be replicated. The mix of the two, however, create an item that is both valuable, easily transported, and cannot be replicated. Within that canon of Star Trek it never says where Latinum comes from. In several games, it comes from a specific kind of nebula where as in some of the non-canon novels it comes from crystals that can be mined. In either case, the Federation has little use for the substance other than trade with races who use it and scientific research.
Economic System of the Federation
While most people in the United States would not taking kindly to this idea, it appears that the United Federation of Planets is a largely socialist system, able to work with established democratic freedoms because of the energy abundance. In many episodes, especially those surrounding Star Trek Deep Space 9, it is seen where the Federation government officials take the collectivist view against even large numbers of colonists for the advantage of the state. Now, it is also clearly stated that the United Federation of Planets is a representative republic where free elections are held on all member worlds to elect senators who attend the Federation Council.
While planets must have governments which share Federation values, it does not anywhere state in canon that they must be democratic in nature, though it is heavily implied. The TV shows and movies depict a world similar to that of the United States of America, they are have "done away with petty differences" and of course being an American TV show it is very centered on American values. However, if one takes a longer view, the economy does not run off of exchange of wealth (capitalism) but rather runs off of the free and open cooperation of members of society to better themselves and each other. This collectivist view is far more similar to socialism as an economic system than of capitalism practiced in the United States.