Refrigerators use power at a voltage of around 110 volts in order to function correctly. When lightning strikes a power line, the voltage in the line jumps and consequently the voltage in appliances connected to the mains power system also jumps. This can cause electrical equipment to burn out and components to melt, leading to refrigerator failure.
When the compressor in a refrigerator is subject to a lightning strike, it will often overheat. This may cause the compressor to burn out; the seals around the compressor valve to melt, allowing the freon to leak out -- or the electrics in the compressor circuits to fry. As a result, the refrigerator will fail.
Power surges cause wiring to melt, both the internal wiring of the refrigerator and the external wiring inside the power cable. This can lead to short circuits, power level fluctuations and potentially even fires due to components overheating due to too much electricity flowing into them when parts malfunction. In addition, if the plastic insulation around the power cable melts, this becomes a fire risk in and of itself.
In order to prevent damage to your refrigerator due to a lightning strike, you can connect a power surge protector between the refrigerator and the mains power socket. This will absorb the power spike a lightning strike causes, leaving the refrigerator unharmed. Alternatively, turn off the power socket and disconnect the refrigerator for the duration of the lightning storm to avoid the power spike entirely.