Optogenetics is an emerging technology that uses the light-responsive effects of photosensitive proteins to regulate the function of specific cells. This technique combines genetics with optics, allowing for the precise inhibition or activation of cell functions through the introduction of photosensitive proteins into target cells and subsequent light stimulation to activate these proteins. In recent years, numerous basic and clinical studies have demonstrated the unique advantages of this approach in the research and treatment of neurological disorders. This review aims to introduce the fundamental principles and techniques of optogenetics, as well as its applications in the research and treatment of neurological diseases.