The pair production process $$\gamma \to e^+ + e^-$$ where a photon creates a positron and an electron is allowed based on conservation of electric charge and number of leptons (number of particles minus number of anti-particles). However it is forbidden by relativistic kinematics: the right-hand side has a rest frame but the the left-hand side does not, so momentum cannot be conserved in the process. Pair production in the vicinity of for example an atomic nucleus, $$\gamma + Ze \to e^+ + e^- + Ze$$ is allowed since the atomic nucleus can absorb the recoil.
Naturally from conservation of energy the photon energy must exceed a minimum value $E_\text{min}$, since the particles created have rest mass. Now $E_\text{min}$ is not quite $2m_e$, twice the electron mass, since there exists a bound $e^+e^-$ state with an energy slightly lower than $2m_e$, but this correction is $\approx 7\; \text{eV}$ and $2m_e \approx 1\; \text{MeV}$.
This process can be observed in the lab with some fairly basic equipment. You need a radioactive sample that emits $\gamma$-rays above $E_\text{min}$ (preferably at much higher energies, say $\approx 5 E_\text{min}$), a piece of dense metal (like lead) and a photon detector. Pair production will take place in the lead, and you can observe a peak of photons with energies close to $m_e$. They come from the positron created annihilating with an electron, $$e^+ + e^- \to \gamma + \gamma$$ which is most likely to occur when the particles are at relative rest, giving each photon an energy of $m_e$.
(The inverse process $$\gamma + \gamma \to e^+ + e^-$$ is also allowed but it is much harder to create in the lab. You need a very, very big laser.)