Our economy is based scarcity. You can obtain value by controlling resources that are scarce. Everyone needs air, but everyone has air so it's not valuable. Not everyone has food so it's valuable. The catch is that just because it's scarce doesn't mean it's valuable. Value implies scarcity, or the perception of scarcity, but scarcity does not imply value.
Value can also be created. You can turn something that's freely available like wood, into a carving, which is scarce and hence valuable. You can also turn something not scarce into something of value by artificially making it scarce. The prime example of this is the De Beers corporation, who artificially inflated the price of diamonds by controlling the majority of them.
Things of value don't have to be material. Increasingly information is becoming more valuable then physical resources. Many science fiction stories examine societies where the economic system they have is based not on the scarcity of matter, this is the future after all, but on the scarcity of information. Iain M Banks envisions one such society called "The Culture" where it's citizens have all their material needs met, but most definitely don't get bored in this material utopia. Cory Doctrow writes of a society were wealth is calculated based on how much other people esteem or respect you. The novel is called Down and Out in the Magic Kingdom (which you can get for free here)
I think all societies will end up with some form of economic system. It could be based on reputation or information, but I hope one day that none will be based on the scarcity of physical resources like shelter or food.