California’s wildfires, earthquakes, and natural gas explosions are fueling a push to adopt all-electric ordinances in Santa Rosa and Berkeley, where past fires leveled thousands of homes and killed dozens of people.

Adding requirements for new construction to be ready for electric-only appliances and electric heat also is gaining traction out of concern about climate change. Costs of all-electric systems, meanwhile, are declining, and options for renewable energy are increasing.

Cities around California are considering adopting all-electric ready requirements. Berkeley and Santa Rosa are going further in proposed ordinances to be voted on this fall that would ban natural...