The explanation is as follows. Graphite can conduct electricity because of the delocalised (free) electrons in its structure. These arise because each carbon atom is only bonded to 3 other carbon atoms. This leaves 1 electron to become delocalised. However, in diamond, all 4 outer electrons on each carbon atom are used in covalent bonding, so there are no delocalised electrons. Hope it answers your question. All the best!