Consumer units play a crucial role in electrical safety by housing protective devices that monitor and control the flow of electricity. They protect against overcurrents, earth faults, and surges, thereby reducing the risk of electric shock, fire hazards, and damage to electrical equipment.