Earthing is the process of connecting a body to earth with a conductor.
Earthing provides an easy path for electrons to flow between the lightning conductor and the earth.
During a lightning strike, the electric charge from the clouds flow through the lightning conductor.
Hence, earthing has to be provided to lightning conductors so that the charges flow into the earth without damaging any buildings nearby.