Recent technological advances open exciting avenues for improving the understanding of mechanisms in a broad range of epilepsies. This chapter focuses on the development of optogenetics and on-demand technologies for the study of epilepsy and the control of seizures. Optogenetics is a technique which, through cell-type selective expression of light-sensitive proteins called opsins, allows temporally precise control via light delivery of specific populations of neurons. Therefore, it is now possible not only to record interictal and ictal neuronal activity, but also to test causality and identify potential new therapeutic approaches. We first discuss the benefits and caveats to using optogenetic approaches and recent advances in optogenetics related tools. We then turn to the use of optogenetics, including on-demand optogenetics in the study of epilepsies, which highlights the powerful potential of optogenetics for epilepsy research.