Diodes are components which allow current to flow in just one direction. It is often recommended that a diode be fitted to prevent reverse current flow back through a PV solar panel at night time (dark current). As current passes through a diode there is a voltage drop with power lost as heat. With a small 6V solar panel, the losses in the diode would exceed the power which would have been lost as dark current, but for a 12 Volt system or higher, a blocking diode should always be used.
The diode should be fitted into the positive leg of the circuit between the fuse and the battery. If more than one battery is being charged from the same panel(s) then a diode (and a fuse) should be fitted for each battery.
Low loss Schottky diodes (pictured above) are best since the least power is lost thanks to their low 0.3-0.5V voltage drop.
One situation where diodes are essential is with bypass diodes. Here a diode is fitted across each panel (in parallel) in a multi panel set up. Most larger solar panels have bypass diodes incorporated into them. When one of the panels in the system is damaged, weak, or (most likely) under shade, there is the risk that full current from the rest of the panels will pass through the shaded panel and cause overheating (hot spot) damage. Bypass diodes are not essential for 12 and 24 volt systems, but for systems over 36 volts they should always be used. Click here for more information on the effect of shading on solar panels and the use of bypass diodes.