It sounds like a fairy tale but here’s an explanation:

When stars and planets are formed, they do so from the same cloud of gas, so their bulk compositions are similar. A star with a lower carbon to oxygen ratio will have planets like Earth, comprised of silicates and oxides with a very small diamond content (Earth’s diamond content is about 0.001%).

But exoplanets around stars with a higher carbon to oxygen ratio than our sun are more likely to be carbon-rich. Allen-Sutter and co-authors Emily Garhart, Kurt Leinenweber and Dan Shim of ASU, with Vitali Prakapenka and Eran Greenberg of the University of Chicago, hypothesized that these carbon-rich exoplanets could convert to diamond and silicate, if water (which is abundant in the universe) were present, creating a diamond-rich composition…

For carbon-rich planets that are the focus of this study, however, they likely do not have the properties needed for life.

While Earth is geologically active (an indicator habitability), the results of this study show that carbon-rich planets are too hard to be geologically active and this lack of geologic activity may make atmospheric composition uninhabitable. Atmospheres are critical for life as it provides us with air to breathe, protection from the harsh environment of space, and even pressure to allow for liquid water.

Karin Valentine, Arizona State University, “Carbon-rich exoplanets may be made of diamonds” at Phys.org

Figures. All the diamonds are light years away out there and all the life forms who like bling are here (or somewhere else).

The paper is open access:

Abstract Astrophysical measurements have shown that some stars have sufficiently high carbon-to-oxygen ratios such that the planets they host would be mainly composed of carbides instead of silicates. We studied the behavior of silicon carbide in the presence of water under the high pressure–temperature conditions relevant to planetary interiors in the laser-heated diamond-anvil cell. When reacting with water, silicon carbide converts to silica (stishovite) and diamond at pressures up to 50 GPa and temperatures up to 2500 K: $\mathrm{SiC}+2{{\rm{H}}}_{2}{\rm{O}}\to {\mathrm{SiO}}_{2}+{\rm{C}}+2{{\rm{H}}}_{2}$. Therefore, if water can be incorporated into carbide planets during their formation or through later delivery, they could be oxidized and have mineralogy dominated by silicates and diamond in their interiors. The reaction could produce CH4 at shallower depths and H2 at greater depths that could be degassed from the interior, causing the atmospheres of the converted carbon planets to be rich in reducing gases. Excess water after the reaction can be stored in dense silica polymorphs in the interiors of the converted carbon planets. Such conversion of mineralogy to diamond and silicates would decrease the density of carbon-rich planet, making the converted planets distinct from silicate planets in mass–radius relations for the 2–8 Earth mass range. – Oxidation of the Interiors of Carbide Exoplanets H. Allen-Sutter, E. Garhart1, K. Leinenweber, V. Prakapenka, E. Greenberg and S.-H. Shim Published 2020 August 26 • © 2020. The Author(s). Published by the American Astronomical Society.