The invention provides polynucleotides and methods for expressing light-activated proteins in animal cells and altering an action potential of the cells by optical stimulation. The invention also provides animal cells and non-human animals comprising cells expressing the light-activated proteins.