Coconuts are replicas of the legendary Coconut of Quendor, a relic thought to encase all human knowledge from the First Age of Magic. These replicas are said to convey part of this wisdom onto the owner (although others have opined that it is was a cheap marketing trick to get the populace to purchase more).

Due to the terrible effects of the overwhelming zorkmid inflation towards the beginning of the Second Age of Magic, that made the coins nearly worthless, coconuts became a primary means of currency. Though the value of merchandise in those days varied widely, the average price of a coconut seems to have been worth about zm15,000. Despite the high inflation, exquisite coconut shakes were in high demand.

SOURCE(S): Legends of Zork