Photoionization is the formation of an ion from a neutral atom due to a photon hitting it with sufficient energy to release an electron. In various situations, it may be called the photoelectric effect or bound-free absorption. The process is significant in stars and gas clouds, and in observations because it affects the spectrum in ways that can be analyzed.
The photon needs sufficient energy, thus sufficient frequency and sufficiently small wavelength to free the electron(s). The energy required depends upon the element and the degree to which the atom is excited, i.e., for hydrogen in its lowest energy state, 13.6eV (electron volts) is the lower energy limit, whereas if the electron is excited to the next state, which is 10.20eV higher, then only 3.40eV is required.
The term photoelectric effect refers specifically to the electrons being freed from material, such as in photoionization, but if there is a source of electricity such as in a circuit, the material may remain relatively neutral. The term is generally used for solid materials, compounds, and the necessary energy to free an electron from a compound differs from that needed to ionize any of the individual elements. The effect was first noticed by Heinrich Hertz as a metal (as per chemistry rather than the astrophysical concept) emitting electrons when ultraviolet light was striking it, and was explained by Einstein in one of his four famous papers of 1905, which won Einstein the Nobel Prize.