Sara Lewis is a professor of evolutionary ecology at Tufts University, and author of Silent Sparks: The Wondrous World of Fireflies (2016, Princeton University Press). The opinions expressed in this commentary are hers.

(CNN) We're well past the Fourth of July, but my dreams are still illuminated by the spectacles of two summertime icons: fireworks and fireflies. Strikingly juxtaposed, one light show explodes boisterously, so full of crackle and boom, while the other sparkles in eerie silence.

Each year our firework displays seem bigger and more spectacular. But many firefly populations seem to be flickering out.

Fireflies! For centuries, their beauty has inspired wonder and delight. Why do these creatures seem so magical? Maybe it's the way they instantly transport us back to once-upon-a-time summer evenings spent chasing their silent sparks across the lawn. Maybe it's the way fireflies' resplendent displays can transform our everyday landscapes into places ethereal and otherworldly.

Whatever the explanation, in cultures around the world fireflies elicit a nearly mystical reverence.

More than 2,000 different firefly species are spread across the globe, gracing every continent except Antarctica. In the United States and in other countries firefly ecotourism is flourishing, and people are venturing out into the night to admire their dazzling displays.

Photos: Radiant designs from around the world Photos: Radiant designs from around the world Solar-powered glowing concrete – Mexican scientist Carlos Rubio Avalos has invented a cement that glows in the dark. Pictured, a block of the material, which is currently in the early stages of commercialization. But his is not the only vision for of a glowing future ... Hide Caption 1 of 9 Photos: Radiant designs from around the world ... Glowing Lines –

Created by Dutch artist Daan Roosegaarde and Heijmans Infrastructure, these "Smart Highways" are a series of interactive and sustainable roads. The designers are experimenting with a number of solutions such as glowing lines, pictured, that use sunlight to charge, and glow in the dark. Hide Caption 2 of 9 Photos: Radiant designs from around the world Glowing Lines – The first such highway in Holland has been built, with more on the horizon, according to Studio Roosegaarde . The goal is to make smart roads that can respond to traffic -- for example, by turning off lights when there is no traffic, or using temperature sensors that switch on warning signs when the roads get slippery in the winter. Hide Caption 3 of 9 Photos: Radiant designs from around the world Glow-in-the-dark bicycle path – Roosegarde also designed the Van Gogh Bicycle Path -- inspired by the painting Starry Night . Its surface is coated with a special paint that glows in the dark, and is powered by energy absorbed from sunlight. Hide Caption 4 of 9 Photos: Radiant designs from around the world Bioluminescent natural lighting – French start up Glowee has an alternative solution to electricity in urban areas, shown in this rendering. Hide Caption 5 of 9 Photos: Radiant designs from around the world Bioluminescent natural lighting – A rendering of French start-up Glowee 's vision of urban lighting, which uses bioluminescence, a kind of living energy source found in nature. Its soft glowing light emits less heat and light pollution than ordinary lighting, the company says. Hide Caption 6 of 9 Photos: Radiant designs from around the world Bioluminescent natural lighting – Bioluminescence is a chemical reaction within cells, which makes living organisms produce light. Inspired by real-life glow-in-the-dark sea creatures, Glowee's technology is made using natural properties found in marine micro-organisms. Hide Caption 7 of 9 Photos: Radiant designs from around the world Photoluminescent pebbles – This path in Be'erot Khan, Israel, is lit up at night by Ambient Glow Technology, which uses a photoluminescent stone that can be placed in concrete and asphalt. The stones glow throughout the night after having soaked up light during the day, according to the makers. Hide Caption 8 of 9 Photos: Radiant designs from around the world Solar-powered glowing concrete – This illustration imagines a future in which streets are lined with luminous buildings. Hide Caption 9 of 9

It's a heartwarming trend, since nowadays we seem to spend much too much time plugged into our digital devices and too little time engaged with the natural world. Yet even as firefles encourage more and more people to reconnect with nature's magic, their populations are endangered by human activities such as habitat loss, light pollution and pesticides.

Fireflies thrive in fields, forest, marshes, and mangroves. But these wild places steadily succumb as waves of development replace them with shopping malls and shrimp farms, parking lots and palm oil plantations.

Light pollution, a well-known disruptor for many nocturnal animals, poses a singular threat for fireflies. Because their courtship rituals rely on detecting luminous signals, fireflies are especially sensitive to background illumination. A recently published study of the courtship habits of European glow worms revealed that the bright halos surrounding streetlamps discourage flying males from seeking out their sedentary females. So those female glow worms who display their wares near streetlamps end up entertaining fewer suitors.

JUST WATCHED The town that stood up to coal Replay More Videos ... MUST WATCH The town that stood up to coal 03:53

Juvenile fireflies are especially harmed when these insecticides are sprayed on lawns and gardens. The systemic herbicide 2,4 --D is used to kill broad-leafed weeds, yet it's also toxic to earthworms, a dietary staple for baby fireflies. Fireflies are thus directly and indirectly harmed by overuse of pesticides.

And there's another, more insidious threat: commercial harvesting from wild firefly populations. Most people are surprised to learn that, for decades, U.S. fireflies were harvested en masse to extract their light-producing chemicals , and that this practice is still going on. Japanese fireflies, harvested for their luminous beauty, were nearly extinguished from the country during the early 20th century. Today, Chinese fireflies are at risk from commercial harvesting.

Are we then doomed to a world devoid of fireflies? Not immediately. Although populations overall are surely waning, we still have plenty of places where these magical insects thrive.

So how can we ensure these silent sparks will stick around for future generations to enjoy?

Such conservation efforts are expanding worldwide. In 2010, international experts gathered in Malaysia to craft a document known as the Selangor Declaration on the Conservation of Fireflies . To preserve firefly populations, they said, habitat protection must be the top priority.

The United States has 120+ different firefly species, with southeastern states hosting the greatest diversity. Here, though, fireflies have yet to secure any special privileges. Some species are common and widespread, and at present they don't seem to need protection.

But others, such as the unique Blue Ghost fireflies (Phausis reticulata) of DuPont State Forest in North Carolina, and the synchronous fireflies (Photinus carolinus) found in Great Smoky Mountains National Park, are rare. These fireflies are distinctive in both their behavior and their ecology. Their idiosyncrasies restrict them to certain habitats and also make them more vulnerable to extinction.

Why not consider setting aside a few places where fireflies thrive? Working with local, state, and national conservation organizations, we could begin by establishing firefly sanctuaries and management plans for existing ecotourist sites. We could identify and protect biodiversity hotspots known to support many different firefly species. And we surely could prohibit commercial harvesting of wild fireflies.

More than just summertime icons, fireflies offer each of us the gift of wonder and an infallible formula for falling in love again and again with nature. Who among us would remain unmoved if we lost these stunning ambassadors for Earth's natural magic?