According to the National Electric Code (NEC), all solar panel systems need to be grounded to code. At a minimum the NEC requires that all systems must have equipment-grounding conductors that connect the metal surfaces of the solar panels to a ground rod. typically grounding systems include the following items:
code compliant ground lugs screwed into each aluminum rail that touches the solar panel
grounding rod driven into the earth near the solar panels
stranded copper wire or solid wire connected to the ground lugs and then to the ground rod.
In Europe, grounding is not required, although here in the US it’s a must, Homepower ran an excellent article about solar electric system grounding, check it out below: