1 ether is 10^18 wei, the smallest denomination. Why does ether have such a high degree of divisibility?
Vitalik had the foresight to realize one day, most financial institutions, corporations and people would utilize ethereum. To a further extent, alien races and far away worlds may also want to utilize ethereum.
While the current financial market cap of all value including derivatives in the financial world are in the trillions (1,000,000,000,000), if not, hundreds of trillions (100,000,000,000,000) or more. Our total population in the billions (8,000,000,000). Accounting for additional neighboring planets and yet to be discovered M-class planets, the only rational thing to do was provide ether the room to grow to it's true potential.
Allowing for 18 decimal places was the only way to move forward. This will allow ethereum to one day achieve it's true market cap and be utilized within our known universe by all species capable of building a computer and communicating through the inter-web to participate in universal-commerce without fear of being scammed.
I do not know for sure, but it makes lots of sense that if doing fixed precision arithmetic, 18 decimal places is exactly the amount of precision that fits in a 64 bit signed long when storing the inverted basis to prevent any rounding issues. So, if it were me, I would have made it 18 decimal places for exactly this reason.
Similarly, if you are doing fixed precision arithmetic by storing your value in a signed 32 bit integer and expect to carry 2 decimal places like most currencies and you want an even power of 10 as your maximum global limit, then 21 million is your number, which coincidentally is what Satoshi used.
In addition to Xilis' answer:
Ether itself has 18 decimals, most ERC-20 tokens simply follow that standard.
1 ETH is represented by 10^18 of its natural unit ( 1 Ether = 1,000,000,000,000,000,000 wei ).
This offers you much greater precision - essentially, you aren't limited to trading the equivalent of a cent ($0.01 for example), you can go much, much lower. It means you can own - actually own, and have full control of - a very small portion of a whole Ether. Might not be so relevant today, but it might be in the future; in case the trade value rises dramatically, you would still be able to buy, own and use the system, without any changes.
Solidity assumes 1e18 to be 1 ether as referenced Here.
As referenced in a post here:
It makes math work out really really well when interchanging with other systems. If you have to restrict the precision for some good reason, try instead restricting the divisibility of the transfer functions. For example, only increments of 1000000 can be transferred gives the same effect as using fewer decimals than 18, but still retains the convection of putting the point at the 18th decimal place.