Diamond is a costly gem. It can be found in small quantities on any planet (even on the first Garden world, but very deep, in the core layer) or sifted from Ash Pile or Volcanic Ash.
It is extremely valuable in the early/mid game, because 15 Diamonds can be traded for a Teleporter Core, and you need those for Item Transference Devices (a cornerstone of automating your base).
Many byproducts will come from this process, some of them rather useful. Ash Pile and Pure Carbon can be processed for more diamonds.
When using infinite oceans (e.g. on Aether World planet), Industrial Centrifuge will be most efficient. It is cheap, fast and does not consume a lot of electricity. The lower chance of Carbon per liquid is fully compensated by its speed.