Diamond is made up of carbon atoms bind together by strong covalent bond in tetrahedral arrangement. Due to this strong covalent bond electrons are localised (free electrons are not there), and thus diamond is bad conductor of electricity.
But diamond is good conductor of electricity by molecular vibration. This property is used in jewellery shop to distinguish between diamond and its imitators.
Graphite is two dimensional layers of carbon atoms connected in hexagonal array. In a layer one carbon atom is bonded to three other carbon atoms. The layers of graphite are held together by weak van der Waals forces. In hexagonal configuration of carbon array some p orbitals are free which can form delocalised π-bond. For this delocalised π-orbital, which are easily movable, graphite are good conductor of electricity along the plane, but bad conductor along perpendicular to the plane.