In diamond, each carbon atom is in $sp ^{3}$ hybridised state and linked to four other carbon atoms tetraherally by covalent bonds. Since there is no mobile electron present, diamond is a bad conductor of heat and electricity.
In graphite each carbon atom is in $sp ^{2}$ hybridised state and is linked to three other carbon atoms in a hexagonal planar structure. The $\pi$ -electrons are free to move throughout the entire layers, therefore graphite is a good conductor of heat and electricity.