Photoemission to measure band gaps? Photoemission works  by conservation of energy:
$$\bar{h}\omega = E_{kin} + E_i + \phi$$, 
where $\bar{h}\omega$ is the incident photon, $E_{kin}$ is the measured kinetic energy of the ejected electron $E_i$ the binding energy of the electron and $\phi$ the work function (necessary energy to remove electron from the sample to the vacuum). 
The binding energy of the electron is the energy of the band? 
To calculate the band gap we have to do this process many times in order to calculate the conduction and valence band energies? 
 A: How photo electric effect happens?
According to quantum theory (based upon which the photoelectric effect) is explained, the electrons in an atom are in quantized states. For a given photosensitive material the electrons in the valence shell are having unique quantized energy levels. When a light of suitable energy equal to the energy level of the electron is incident on the metal, the electron absorbs this energy and break out from the nuclear binding energy as it cannot get excited into a new energy state since there are no further states (the electron is in the valence shell or the most energetic level). This energy value is a characteristic property of a given material. The energy of incident light or photon is determined by its frequency. That's why we say that a minimum energy is required for an electron to break up from the nucleus, which we call the threshold energy (or threshold frequency). This energy is also called the binding energy (which is the energy required to completely remove an electron from an atom). This energy is termed as the work function. Based on the above discussions it is clear that the work function is material dependent.  
Suppose we gave some energy above the work function through radiation. Then the extra energy from the photons after work function is utilized by the electrons to mobilize or the extra energy appears as the electron's maximum kinetic energy in vacuum (to avoid any absorption of energy by the medium). So the equation reads  
$$E=\bar{h}\omega=\phi+E_{kin}$$  
where $E$ is the energy of the incident photon
$\bar{h}$ is the modified Planck's constant
$\phi$ is the work function of the metal or the binding energy of the electron
$E_{kin}$ is the maximum kinetic energy of the electron emitted from the metal
It is consistent with the conservation of energy.  
Is binding energy same as work function? 
For a given metal, the work function is the same as the binding energy of the electron. The reason is explained in the above paragraphs. The process of electron emission is an endothermic process. So the $E_i$ term you inappropriately used in the equation will not come in the right hand side.  
Once the electrons are free to move, the electrons are called free electrons or conduction electrons.   
Now, according to solid-state physics, band gap energy is the energy range in a solid where no electron states can exist. i.e., over that range of energy value, there is no energy state of an electron. Electrons can absorb energy from photons when irradiated, but they usually follow an "all or nothing" principle. All of the energy from one photon must be absorbed and used to liberate one electron from atomic binding, or else the energy is re-emitted. If the photon energy is absorbed, some of the energy liberates the electron from the atom, and the rest contributes to the electron's kinetic energy as a free particle.  
The electrical band gap or the transport gap energy is the threshold energy required to create an electron-hole pair that are not bounded together by electrical attractions. But optical band gap energy is the threshold energy for the photons to be absorbed by the electron. This energy is just enough to create an electron hole pair. With this energy it is not possible to separate this electrically bounded pairs. So the electrical binding energy is much larger than the optical binding energy.   
Now, in the case of metals, the electrons are filled up to the Fermi level. There is no band gap. So in that case, the work function is the threshold energy to liberate an electron from the metal surface (not from the bulk). In the case of semiconductors, they have energy band gaps. At any finite temperature, there is some electrons in the bottom of the conduction band due to thermal excitation. So here the photoelectric effect is not giving you the work function, but the electron affinity of the semiconductor. To find the work function in this case, you need to find the difference between the bottom of the conduction band and the Fermi energy level and then add that quantity to the electron affinity.  This is the reason why the work function of a p-type semiconductor is not the same as that of an n-type semiconductor.   
This means the binding energy is not the same as band gap energy.
