A heterojunction is a region of electrical contact between two different materials. An example of a heterojunction device is a CIS solar cell, where the junction is formed by contacting two different semiconductors – cadmium sulfide (CdS) and copper indium diselenide (CuInSe2). This structure is often chosen for producing cells made of thin-film materials (see thin film solar cell) that absorb light much better than silicon. The top and bottom layers in a heterojunction device have different roles. The top layer, or "window" layer, is a material with a high band gap selected for its transparency to light. The window allows almost all incident light to reach the bottom layer, which is a material with low band gap that readily absorbs light. This light then generates electrons and holes very near the junction, which helps to effectively separate the electrons and holes before they can recombine.


Heterojunction devices have an inherent advantage over homojunction devices, which require materials that can be doped both p- and n-type. Many photovoltaic materials can be doped either p-type or n-type, but not both. Again, because heterojunctions don't have this constraint, many promising photovoltaic materials can be investigated to produce optimal cells.


Also, a high band gap window layer reduces the cell's series resistance. The window material can be made highly conductive, and the thickness can be increased without reducing the transmittance of light. As a result, light-generated electrons can easily flow laterally in the window layer to reach an electrical contact.