In Yahoo! Finance, we see the following quotes among others:
Nasdaq 3,136.19 -13.27 -0.42% Oil 89.879997 -1.83 -2.00% EUR/USD 1.3031 0.00 +0.11%
What determines the number of decimals displayed?
This is an example of minimum price variation (also known as the minimum price increment or the minimum price fluctuation).
All public quotes for US equities are displayed to the nearest penny. (Hidden quotes may be entered at sub-penny increments.) US stock indices follow this convention and thus quote to the nearest penny.
The oil listing is odd indeed. If I click through to the full oil page, I only see that the price is listed to the nearest penny. Indeed, I see that this price represents the NYMEX crude (CL) contract. From the CME Group's contract specification, the minimum fluctuation is one penny per barrel. So it's bizarre that Yahoo's front page is showing something else.
As for the Euro, that's a spot price. I can't see exactly where Yahoo is getting their data, but they do describe it as "bank rates". (Google gets theirs from Citi.) I suspect the convention is 0.0001 dollars increment per euro since that's what CME Group uses in the futures market.