I f one module in a series string fails, due to shade or other factors, it produces so much resistance that all the other modules in that string are cut off. A bypass diode creates a path around the disabled module.
Many panels are set up as actually two strings in one frame, and each half of the panel has a bypass diode, usually inside the junction box. These can go bad if the panels are hooked up incorrectly, from lightning hits, or from overload. These serve the same purpose and use the same diodes as above.
Bypass diodes are not needed in all systems, and usually not at all in 12 volt systems. This diode is rated at 15 amps in free air, 8 amps in a solar panel junction box.