A diamond is a carbon crystal. Due to the considerable heat and pressure required to form diamonds, they are quite rare in nature. This, combined with their inherent beauty, made them objects of great value for many centuries. In addition, they are one of the hardest substance known in the universe, which made them valuable for a variety of industrial uses.
Tritanium was said to be 21.4 times harder than diamond. (TOS: "Obsession") As well, cast rodinium was called the hardest substances known to man, suggesting that it too was harder than diamond. (TOS: "Balance of Terror")
By the mid-23rd century, synthesizing technology had become sophisticated enough that diamond could be easily created in large quantities, whenever needed, greatly reducing their value. Standard technology aboard the USS Enterprise was capable of performing this process.
In mid-2267, Korob attempted to bribe Kirk, Spock, and McCoy with gemstones, including diamonds. Because of an error in his telepathic scan, Korob mistakenly believed these stones were valuable. (TOS: "Catspaw")