Why are diamonds used for spacecraft protection?
Perhaps the question is directed at the application of a thin film of diamond that coats the substrate ("base material") of some semiconductor (or solid state) components. Diamond, an allotrope of carbon, has a high thermal conductivity. Heat moves through diamond like a rocket compared to other stuff like aluminum or copper. That's called thermal conductivity. A laser can be used in a special carbon rich atmosphere to cause a diamond film to "plate out" and "coat" a surface. On a finished product, the diamond-coated surface now conducts heat away from sensitive or highly heat loaded components quickly so it can be radiated away from the spacecraft. (Remember that there is no convection cooling in space!)