Molecules that respond to light are increasingly being used as input domains to facilitate the non-invasive control of complex gene circuits. The vast majority of light sensing proteins come from naturally occurring photoreceptors and light-gated ion channels, although synthetic chemical photocaging has also found use. Since light can be coupled to a transmembrane receptor domain located on cell surfaces, it can be used in lieu of chemical signals to turn on or off signalling cascades.
In general, light causes a change in the structure of an aromatic ring molecule (called a chromophore) that is attached to a protein. The structural change in the chromophore, induces a conformational change in the protein that is then relayed to effector molecules such as a kinase. The process is essentially similar to the field of signal transduction.
Photocaging involves the covalent addition of a small molecule effector (e.g., IPTG or doxycyline) onto another molecule (the cage) that upon addition of light such as UV, releases the effector molecule to perform a task. The cage group typically consists of aromatic rings, such as ortho-nitrobenzyl moieties, that undergoes photolytic cleavage to unmask the target molecule. This permits the spatiotemporal control of gene function upon light stimulation. The caging of IPTG, for instance, permits the temporal control of genes under the control of the Lac operator. Alternatively, one might cage a small molecule within a protein blocking its activity, that upon light-stimulus permits the protein to function. Amino acids such as Tyrosine have been caged within the active site of a polymerase, that upon light expression, permits gene expression. Alternatively, localization signals can be caged to augment controlled spatio control of proteins. 
Photoreceptors are naturally occurring multidomain proteins, found in all three kingdoms of life, used to relay signalling cascades from the cell surface to effector molecules. They are the largest class of proteins used. Photoreceptors contain a protein component and a photopigment, which reacts to light to undergo isomerization or reduction. This initiates a conformational change in the protein that is relayed to another protein on the inner cell surface, mediating a signalling cascade that can control gene expression.
To build a new cascade, one simply alters the protein-protein interactions between various photoreceptors coupled to new effectors. Effectors can transduce signal in various ways such as phosphorylation (kinases) or relocalization to the nucleus (transcription factors).
Types of Photoreceptors
- rhodopsins- retinal chromophore, visual light used in eye cells.
- phytochromes- bilin chromophore, red light detection used by plants for circadian rhythm.
- xanthopsins- trans-p-coumaric acid chromophor, blue light avoidance response used by Ec. halophila
- cryptochromes- cryptochrome chromophore, blue-green light used by animals for circadian clock to seed germination in plants
- phototropins- Flavin chromophore (FMN), blue light for signal transduction in algae and bacteria
- BLUF- Flavin chromophore (FAD), blue light signal transduction in proteo- and cyano-bacteria
Two Component System
Photoreceptors rely on coupling to another protein such as a kinase to signal effects. This is generally known as a two-component system. Two component systems are best known in signal transduction, where they are coupled not only to light, but chemicals, osmolarity, pH, mechanotransduction, and hormones. The kinase phosphorylates itself or another protein, after a conformational change due the membrane spanning domain (the receptor). Other proteins (called second messengers) then recognize the phosphorylation and relay this signal to gene expression.
In the 2004 iGEM competition, a joint collaboration between the Ellington lab at Texas and the Voigt lab at UCSF led to the invention of "coliroids", bacterial photographs (Hello World). The system consists of two components: 1) a red light sensor that generates a signal 2) a color generator that takes in the signal
In the 2005 paper , the team fused the phytochrome Cph1 to the histidine kinase domain of EnvZ-OmpR (originally an osmoregulator), which then relays a stop signal to a constitutive LacZ reporter producing a black compound. They also had to insert the phycocyanobilin biosynthesis pathway for generating the phytochrome. In this particular system, light addition causes autophosphorylation of the phytochrome/kinase fusion that shuts off signalling to the LacZ reporter. Therefore, cutouts that shine light onto a bacterial lawn at various places can generate images.
The 2005 Texas iGEM team helped to develop a synthetic genetic edge detection system (Texas iGEM 2005), producing color at the borders between light/dark regions. This work was also further expanded and published in Cell in 2009. 
Optogenetics (Light Gated Ion Channels)
The 2019 Oxford English dictionary definition of Optogenetics was fancifully written as:
"the branch of biotechnology which combines genetic engineering with optics to observe and control the function of genetically targeted groups of cells with light, often in the intact animal"
This means scientists can switch on brains cells simply with light. Optogenetics is having the biggest impact in the field of neuroscience, where it is used to activate biochemical processes in neurons at millisecond timescales in live cells or animals.
In contrast to photoreceptors used in two component systems, the photoreceptors here are essentially ion channels, and are referred to as light-gated ion channels. Upon light stimulation, genes such as halorrhodopsin or channelrhodopsin-2, bring in chloride or potassium ions. This electrochemical change triggers an action potential in neurons, activating or repressing the cells. Delivery of light to specific neurons is done through a fiber-optic cable into a mouse's brain, if done on live animals.
Optogenetics video Nature Method of the year 2010
The devices used for this technique are generally encoded directly into the DNA using genetic engineering techniques. The types of protein devices used can be categorized into actuators, which drive light commands into processes, and the sensors, which emit signals as an output for study (ie, GFP).
(ion channels, ion pumps, and regulators of ion channels/pumps)
- channelrhodopsin-2- ion channel for sodium influx, blue light activation of cells.
- chARGe- fly rhodopsin linked to G-protein and phospholipaseC
- LiGluR- engineered Light gated version of glutamate receptor for calcium ions.
(note: TRPM8, TRPV1, and P2X2 were erroneously called light-gated channels in  when they are actually chemical)
- halorhodopsin- ion pump for chloride influx, green/yellow light to silence cells.
(GFP derived signalling of various cells states/outputs)
- FlaSh, SPARC, VSFP, Mermaid
- cameleon- calcium binding to calmodulin linked to GFP
- camagaroo, pericam
- G-CaMP- cAMP binding linked to GFP
- synapto-pHluorin, sypHy
Last year, researchers used viral delivery (rAAV) of channelrhodopsin-2 into the eyes of blind mice to restore many vision functions.  The authors were able to restore vision function in mice suffering from late stage blindness (otherwise known as macular degeneration) by using gene-therapy/insertion of channelrhodopsin-2 directly into retinal biopolar cells. The addition of channelrhodopsin-2 thus restores light-driven activation of the cells, which permitted to perform "escape from a box" behavioral experiments significantly better than blind mice.
- Drepper2011 pmid=21336931
//Lights on and action! Controlling microbial gene expression by light.
- Miesenbock2009 pmid=19833960
//The optogenetic catechism.
- Dorouddchi2011 pmid=21505421
//Virally delivered channelrhodopsin-2 safely and effectively restores visual function in multiple mouse models of blindness.
- Riggsbee2010 pmid=20667607
//Recent advances in the photochemical control of protein function
- vanderHorst2004 pmid=14730990
//Photoreceptor proteins, "star actors of modern times": a review of the functional dynamics in the structure of representative members of six different photoreceptor families.
- Levanskaya2005 pmid=16306980
//Engineering Escherichia Coli to see the light
- Tabor2009 pmid=19563759
//A synthetic genetic edge detection program.