Cities have turned earth into a kind of planetary nightlight. We can’t peer down from the moon to see what it looked like before the Industrial Revolution, but it’s safe to say it was, well, dark. Since then, if you can imagine the animated GIF, cities and their luminous electricity have spread across the world, stringing the earth with glittering urbanism.

But beyond their cosmic aesthetics, those lights mean something. In recent years, studies have found that in developing countries, light data from space might actually tell you more about a city’s economy than the limited data on the ground. And with most of today’s urban growth taking place in developing countries, the brightness of our planetary nightlight may be the best bellwether of progress we have.

Because where electricity goes, economic development—with its longer life spans, higher paying jobs, and safer communities—goes too. Yet much of the world remains in the dark, with 1.2 billion people lacking access to electricity and another 2.8 billion still burning things to cook meals and heat their homes.

***

Since 1990, more than 1.7 billion people have gained access to electricity for the first time. And by 2050, when seven out of every 10 people on the planet are expected to live in cities, billions more will be joining them. But for now, that newfound access still comes with the frustration of frequent blackouts and brownouts that leave many developing countries with at least 20 hours of power outages each month.

In India, home to nearly a fifth of the world’s population, demand for electricity outstrips supply in each of the country’s 27 states. That imbalance reached a tipping point in July 2012 when the energy grid crashed, causing the world’s biggest ever power outage and leaving a chunk of the Indian population equal to that of the entire United States powerless for two days. (According to the Wall Street Journal, more than 300 million more people in the blackout region were also left in the dark, but they never had access to electricity to begin with.)

In an unexpected twist, urban experts say that in the long run, with the right leadership, that lack of a functional infrastructure could actually be a good thing. “Given that 70 to 80 percent of the India of 2030 is yet to be built,” wrote the authors of a 2010 McKinsey report on the country’s urban future, “India has a unique opportunity to pursue its urban development.”

As cities from South Asia to Sub-Saharan Africa evolve from slums into modern metropolises—and bring electricity to the world’s previously unlit places—they’ll be building energy grids to power their cities for essentially the first time. Free from the patchwork systems that mature cities in the U.S. and Europe have hacked together over the last century, they can leapfrog outdated technology and start from scratch at the cutting-edge.

The timing couldn’t be better. In recent years, the cult of big data has turned its gaze toward utility companies, threatening to make them more efficient than ever. For cities, it promises a future with smart energy meters in every home and sensors that take measurements every fifteen minutes in every energy meter. Imagine an infrastructure that knows when you need electricity and when you don’t, feeding it to you on demand. Now compare that to the traditional system that powered the 20th century, which piped in a steady of flow of electricity to your home whether you needed it or not.

It’s the Silicon Valley ethos of the quantified self and personalized technology applied to the energy grid.  “To imagine what the electric industry may look like some day, just think of the smart phone and the millions of tailored applications we see,” said John Cooper, Siemens director of business innovation and co-author of The Advanced Smart Grid. “Energy services delivered by electric utilities will ultimately be about a lot more than just presenting meter data over the iPhone. We need to stretch out our imaginations on this topic.”

And just as the iPhone’s evolution has led to the Apple Watch, the technology that delivers our electricity is seeing constant innovation. Teams like the one Cooper runs at Siemens are rethinking how electricity gets into our houses, connecting  wind farms and hydropower plants to mainland grids thousands of miles away with barely any energy loss.

And for developing countries with growing cities and wildly mismatched energy supply and demand—not to mention rampant theft that undermines the entire system—the efficiencies could be transformational.  India, for example, currently loses more than 25 percent of its electricity during distribution, which contributed to $25 billion in losses in 2011. In Latin America, that number hovers around 14 percent. For perspective, the U.S. loses between 6 and 8 percent, which can still amount to around $20 billion in losses.

But there’s another driver behind the smart grid hype. As newer cities in developing countries bubble up, their coal-driven energy mix contributes to the planet’s climate woes. Smart grids accentuate the emergence of renewable energy and natural gas as viable power sources, delivering the combination of clean energy to cities, using renewable energy when it’s available and natural gas when it’s not.

With both solar energy and natural gas becoming cost competitive with traditional fossil fuels—and other renewables expected to follow suit—their emergence into the energy market could substantially cut developing cities’ carbon footprints. In the U.S., that’s what’s happening. Between 2005 and 2013, coal’s share of the American energy mix fell from 50 percent to 39 percent as emissions fell 10 percent over the same period. Meanwhile, China and India, which together make up a third of the planet’s population, have energy mixes dominated by coal, oil and biomass and continue to increase their emissions year over year.

Around the world, the smart grid is still very much in its beta phase. But with a cumulative $15 billion being pumped into the industry each year, some expect it to grow to $400 billion worldwide by 2020.

Brazil alone is expected to invest $36 billion in its smart grid and has announced a goal to replace the nation’s 63 million energy readers with smart readers by 2023. India, which is home to slums less developed than Brazil’s cities, is investing $10 billion to develop the foundation for bigger smart grid investment down the line. China’s investment in the smart grid outmatched the U.S.’s for the first time, with $4.3 billion invested in 2013. Meanwhile in the U.S.,  $11 billion dollars have launched pilot projects in Austin, Tex., Boulder, Co., Maui, HI, and other cities.

As for the future of smart grids and the electrification of the world, the hype and promise are certainly there—along with the investment needed to make it happen. It’s too early to see the results, but in 2030, or possibly 2050, when we peer down from the moon, we’ll know it worked if we can see new and glowing pockets of light where today there’s only dark.