Conditions like those inside Neptune cause diamond formation
Ars Technica » Scientific Method 2017-08-27

Enlarge / That lovely blue exterior could be hiding a heart of diamond. (credit: NASA)
Carbon, oxygen, and nitrogen are some of the easiest heavier elements to form through fusion. As a result, they're common in our Solar System, typically found combined with hydrogen to make ammonia, water, and methane. In the gas and ice giants of the outer Solar System, however, these chemicals are placed under extreme pressures, where chemistry starts to get a bit weird. Do these chemicals survive the crushing interiors of these planets?
One intriguing idea is that methane doesn't survive. As pressure and temperature increase, methane should start condensing into more complex hydrocarbons. Then, as pressures increase further, calculations indicate the hydrogen and carbon should separate out, leaving pure carbon to sink to the depths of these planets. As a result, it's been hypothesized that, close to their core, planets like Neptune and Uranus have a layer of pure diamond.
While some evidence supporting this theory has surfaced over the years, it's been hard to precisely replicate the temperatures and pressures found inside the planets. Now, new work done at the SLAC X-ray laser facility supports the idea that these planets are full of diamonds. But the work indicates the diamonds only form at greater depths than we'd previously thought.