Scientists are learning how to turn neurons on and off at will by shining light into caverns of the mind, a technique that someday might allow the precise treatment of people suffering psychiatric problems and other ailments.

By blending gene therapy, neural engineering and fiber optics, experimenters at more than 800 laboratories world-wide are making neurons into switches they can directly control by beaming a selected wavelength of laser light to a targeted cell in a living brain. In specially-wired lab animals, these researchers...