The first time I learned that scientists could control neurons with light, I definitely did not keep my cool. My response was something like, “Holy shit, I had no idea you could do that!”—perhaps not the best thing to say when you’re trying to convince a neuroscience professor to hire you as an undergraduate researcher. I did not get hired.

That was 2008, when the groundbreaking new technique of optogenetics was just bursting into neuroscience. Optogenetics is matter of putting light-sensitive proteins, called opsins, in specific neurons using genetic tools. (The name is quite logical.) The resulting possibilities still have a shade of science fiction: A flash of blue light to a certain bundle of neurons can turn an ordinary mouse into a seething ball of aggression. Or implant false memories. Or let deaf mice hear again. Hundreds, if not thousands, of labs now use this technique.

Ten years ago this month, Nature Neuroscience published the first paper showing that a light-sensitive protein from algae worked—and worked well—at turning on rat neurons. Since then, scientists have used optogenetics in mice, rats, fruit flies, nematodes, and even monkeys. It's hard to understate the technology's impact in neuroscience. "Optogenetics has more than anything else let people play the piano in the brain, as opposed to just slamming their whole forearm down on all the keys," says Joshua Sanes, a neuroscientist at Harvard.

Before optogenetics, neuroscientists largely relied on iplanting electrodes to control neurons. That went one of two ways: activate one neuron at a time or activate millions of neurons at a time. There's no way to stimulate the same group of neurons consistently, experiment to experiment, animal to animal. Plus, electrophysiology is extremely finicky. Grad students spend years perfecting their technique.

Francis Crick speculated about the "way-out" idea of using light to activate neurons back decades ago. The need was clear, but the scientific community was initially skeptical. "There was a bit of the attitude at the time that technology was hype," says Ed Boyden, who was collaborating with Karl Deisseroth's lab at Stanford when he co-wrote that Nature Neuroscience paper. Two of the most prestigious journals, Nature and Science, rejected the paper. And other scientists had put other opsins into neurons, but it never worked very well.

This particular protein called channelrhodopsin-2, isolated from green algae, is an ion channel that opens in response to blue light, creating a current much like a neuron firing. "It worked the first time," says Boyden, which is so unusual that he thought his promising data might just be an artifact.

Once scientists discovered how easy it is to use this opsin, it swept through neuroscience labs. "You take it, you stick it into the cell, and you’re off to the races," says Sanes, who uses optogenetics in his lab to study circuits in the retina. (The slightly longer version is that you find a gene unique to the neurons you want to stimulate, and use genetic tools to basically hitch the light-sensitive protein into those neurons and those neurons alone.) In the past decade, scientists have optimized that first opsin and found new ones that can inhibit neurons or respond to different colors of light.

Optogenetics doesn't solve every problem in neuroscience, and Boyden is one of the first to admit it. If the brain is a computer, then he likens optogenetics to a very good keyboard. What neuroscientists are still lacking is the ability to observe the circuits of the brain in action—exactly what happens when you press that key. Scientists are now working on tools to image hundreds or thousands of neurons at a time at the millisecond time scale of the brain.

When that breakthrough does come, it may come from somewhere unexpected. This protein came from a green algae first isolated from soil in Amherst, Massachusetts. And microbiologists found some of the first opsin swhile investigating a strange orange color in salty waters—that orange turned out to be an opsin that the microbes used to capture and store energy from the sun. And optogenetics is hardly the only game-changing discovery to come out of what may seem like useless research into microbes. CRISPR-Cas9, a much-typed genome editing tool, was came from studying the immune systems of obscure bacteria. "There are so many unmined treasures out there," says Boyden.