When lightning strikes a tree or some other structure on the ground, the top of the structure gets charged with high voltage while the lower portion (in touch with the ground) remains at zero voltage. This high potential difference sets off a very high current in the structure, causing sudden heat generation in the material and its subsequent destruction.
If an aeroplane in flight gets hit by lightning, the plane’s entire surface acquires the same high potential and as there is no potential difference, there is no current and no destruction.