Diamonds don't just shine in the way they are found inside earth. They shine only when cut with the precise angles. Any transparent material has a refractive index. And also they have a critical angle where light totally internally reflect on the surface. Based on these factors there is a pre-defined shape with exact angles to cut a diamond. When a diamond is cut according to these techniques it reflects light so that it appears to be shining.
Diamond has the refractive index 2.42 which is the highest refractive index. Due to that total internal reflection occurs highly in the diamond and the diamond shines.