Lightning strikes are mostly classified as direct and indirect strikes.
Direct Strikes are severe but rare, it leads to melting of the panels and damage to the inverter, fuses, and cable. It induces high current into the system, thus causing overheating and damage to the system.
An indirect strike occurs more often, it creates electromagnetic induction that generates high voltage into the solar system and house. The generated high voltage passes through the system wiring to the components, thus damaging the conductor, solar panels, inverter, and other components connected.

But don’t worry! We take steps to help avoid lightning damages to the PV system.
Risk analysis and protection against lightning must be done at the designing stage.
Two main solutions to protect against the lightning strike:
Grounding Lightning arrestor
Grounding:
Grounding is one of the basic techniques used to divert the path of lightning from the component straight to the ground. For places with occasional lightning strikes, the grounding technique is enough to protect the PV system from lightning and surges (without adding any other protection equipment).
Good grounding is very necessary, even if we use lightning arrestors and surge protectors it will work effectively only with proper grounding.
For proper grounding one needs to follow the following points:
Check the resistivity of the ground: Electricity flow handling capacity. Interconnect all the PV panels, inverter, controller, and all the other components to the common ground along with the house grounding system to the common earthing point. We need to install one earth pit for the DC side (solar panels, DC distribution box) and one for the lightning arrestor and AC side (inverter, AC Distribution Box). For proper and effective grounding, the use of copper / Aluminium wire / GI strip is highly recommended. The wire/strip used should be free from sharp bends and twists and should be buried in a way such that most of the area comes in contact with moist soil.