Understanding how neurons encode information in sequences of action potentials is of fundamental importance to neuroscience. The cerebellum is widely recognized for its involvement in the coordination of movements, which requires muscle activation patterns to be controlled with millisecond precision. Understanding how cerebellar neurons accomplish such high temporal precision is critical to understanding cerebellar function. The development of optogenetics has allowed us to demonstrate how the output of the cerebellar cortex conveys its codes upon downstream areas such as the cerebellar nuclei, thalamus and cerebral cortex and how it can be influenced by its afferent systems such as the mossy fiber and climbing fiber inputs. Our results suggest that the neuronal code employed by cerebellar neurons may span a wide time scale from millisecond precision to slow rate modulations, depending on the behavioral context varying from online motor control to adaptive motor learning and depending on the module that controls these behaviors.