Yes. Diamonds are made from pure carbon, and carbon will burn in an oxygen atmosphere to produce carbon dioxide. However, you needn’t worry about leaving a diamond in the sun. It would take a temperature of 700-900°C before it started to burn, since the carbon atoms in a diamond are in a tight three-dimensional array that’s very hard to disrupt.