In organic chemistry, an electrocyclic reaction is a type of pericyclic rearrangement reaction. The reaction is electrocyclic if the result is one pi bond becoming one sigma bond or one sigma bond becoming a pi bond.  Electrocyclic reactions share the following properties:

 electrocyclic reactions are driven by light (photoinduced) or heat (thermal)
 the reaction mode is determined by the number of pi electrons in the part with more pi bonds
 an electrocyclic reaction can close a ring (electrocyclization) or open a ring
 the stereospecifity is determined by a conrotatory or a disrotatory transition state formation as predicted by the Woodward–Hoffmann rules.

The torquoselectivity in an electrocyclic reaction refers to the direction that the substituents rotate. For example, the substituents in a reaction that is conrotatory can still rotate in two directions. It produces a mixture of two products that are the mirror image of each other (enantiomeric products). A reaction that is torquoselective restricts one of these directions of rotation (partially or completely) to produce a product in enantiomeric excess (where one stereoisomer is produced much more than the other).

Chemists are interested in electrocyclic reactions because the geometry of the molecules confirm a number of predictions made by theoretical chemists. They confirm the conservation of molecular orbital symmetry.
  
The Nazarov cyclization reaction is an electrocyclic reaction that closes a ring. It converts divinylketones to cyclopentenones. (It was discovered by Ivan Nikolaevich Nazarov (1906–1957).)

An example is the thermal ring-opening reaction of 3,4-dimethylcyclobutene. The cis isomer only yields cis,trans-2,4-hexadiene. But the trans isomer gives the trans,trans diene:

The frontier-orbital method explains how this reaction works. The sigma bond in the reactant will open in a way that the resulting p-orbitals will have the same symmetry as the highest occupied molecular orbital (HOMO) of the product (a butadiene). This can only happen with a conrotatory ring-opening that results in opposite signs for the two lobes at the broken ends of the ring. (A disrotatory ring-opening would form an anti-bond.) The following diagram shows this:

The stereospecificity of the result depends on whether the reaction proceeds through a conrotatory or disrotatory process.

Woodward-Hoffman rules 
The Woodward–Hoffmann rules address the conservation of orbital symmetry in electrocylic reactions.

Correlation diagrams connect the molecular orbitals of the reactant to those of the product having the same symmetry. Correlation diagrams can be drawn for the two processes.

These correlation diagrams indicate that only a conrotatory ring opening of 3,4-dimethylcyclobutene is "symmetry allowed" whereas only a disrotatory ring opening of 5,6-dimethylcyclohexa-1,3-diene is "symmetry allowed". This is because only in these cases would maximum orbital overlap occur in the transition state. Also, the formed product would be in a ground state rather than an excited state.

Frontier molecular orbital theory 
The Frontier Molecular Orbital Theory predicts that the sigma bond in the ring will open in a way that the resulting p-orbitals will have the same symmetry as the HOMO of the product.

The above diagram shows two examples. For the 5,6-dimethylcyclohexa-1,3-diene (top row of diagram), only a disrotatory mode would result in p-orbitals having the same symmetry as the HOMO of hexatriene. The two p-orbitals rotate in opposite directions. For the 3,4-dimethylcyclobutene (bottom row of diagram), only a conrotatory mode would result in p-orbitals having the same symmetry as the HOMO of butadiene. The p-oribtals rotate in the same direction.

Excited state electrocyclizations 
Light can move an electron up to an excited state that occupies a higher orbital. The excited electron will occupy the LUMO, which has a higher energy level than the electron's old orbital. If light opens the ring of 3,4-dimethylcyclobutene, the resulting electrocyclization would be occur by a disrotatory mode instead of a conrotatory mode. The correlation diagram for the allowed excited state ring opening reaction shows why:

Only a disrotatory mode, in which symmetry about a reflection plane is maintained throughout the reaction, would result in maximum orbital overlap in the transition state. Also, once again, this would result in the formation of a product that is in an excited state of comparable stability to the excited state of the reactant compound.

Electrocyclic reactions in biological systems 

Electrocyclic reactions occur frequently in nature. One of the most common such reactions in nature is the biosynthesis of vitamin D3.

The first step involves light opening the ring of 7-dehydrocholesterol to form pre vitamin D3. This is a photochemically induced conrotatory electrocyclic reaction.  The second step is a [1,7]-hydride shift to make vitamin D3.

Another example is in the proposed biosynthesis of aranotin, an oxepine found in nature, and its related compounds.

Phenylalanine is used to make diketopiperazine (not shown). Then enzymes epoxidate diketopiperazine to make the arene oxide. This undergoes a 6π disrotatory ring opening electrocyclization reaction to produce the uncyclized oxepine. After a second epoxidation of the ring, the nearby nucleophilic nitrogen attacks the electrophilic carbon, forming a five membered ring. The resulting ring system is a common ring system found in aranotin and its related compounds.

The benzonorcaradiene diterpenoid (A) was rearranged into the benzocycloheptatriene diterpenoid isosalvipuberlin (B) by boiling a methylene chloride solution. This transformation can be thought of as a disrotatory electrocyclic reaction, followed by two suprafacial 1,5-sigmatropic hydrogen shifts, as shown below:

Scope
An example of an electrocyclic reaction is the conrotatory thermal ring-opening of benzocyclobutane. The reaction product is a very unstable ortho-quinodimethane. This molecule can be trapped in an endo addition with a strong dienophile such as maleic anhydride to the Diels-Alder adduct. The chemical yield for the ring opening of the benzocyclobutane depicted in scheme 2 is found to depend on the nature of the substituent R. With a reaction solvent such as toluene and a reaction temperature of 110 °C, the yield increases going from methyl to isobutylmethyl to trimethylsilylmethyl. The increased reaction rate for the trimethylsilyl compound can be explained by silicon hyperconjugation as the βC-Si bond weakens the cyclobutane C-C bond by donating electrons. 

An biomimetic electrocyclic cascade reaction was discovered in relation to the isolation and synthesis of certain endiandric acids:

References 

Chemistry