Channelrhodopsins are light-gated ion channels that, via regulation of flagellar function, enable single-celled motile algae to seek ambient light conditions suitable for photosynthesis and survival. These plant behavioral responses were initially investigated more than 150 years ago. Recently, major principles of function for light-gated ion channels have been elucidated by creating channelrhodopsins with kinetics that are accelerated or slowed over orders of magnitude, by discovering and designing channelrhodopsins with altered spectral properties, by solving the high-resolution channelrhodopsin crystal structure, and by structural model–guided redesign of channelrhodopsins for altered ion selectivity. Each of these discoveries not only revealed basic principles governing the operation of light-gated ion channels, but also enabled the creation of new proteins for illuminating, via optogenetics, the fundamentals of brain function.