What are the requirement for electrical grounding of aircraft in hangar storage? When an aircraft is being stored in a hangar between flights, are there any requirements to have the aircraft connected to an earth ground?

I believe that there is (although I'm looking for the reference), and if so, why and how should this be accomplished?  Is attaching a cable to the metal structure of the hangar an accepted practice?
In general any aircraft parked in hangar should be electrically grounded. The grounding should be done from basic aircraft structure to a low resistance ground.

Grounding of the aircraft is usually done to,


Protect aircraft and personnel against hazards from lightning discharge.
Provide current return paths
Protect personnel from shock hazard
Prevent accumulation of static charge


During de-fueling or refueling, the aircraft is grounded to the fuel truck.

In general, the aircraft are grounded to a point where the impedance is less than 10,000 ohms referenced to earth for static grounding. For power grounding, it should be less than 10 ohms to power systems neutral.

Aircraft are not grounded to the hangar structure as the external power supply, when connected, is grounded to that. 

The best reference, if you ask me, would MIL- HDBK-274(AS)- Electrical Grounding for Aircraft Safety.