The Molecular Orbital Theory (MO Theory) is necessary as it presents some distinct advantages over the valence bond theory (VB Theory). Figure 4.1 below will detail the differences between MO theory and VB theory:

Figure 1.1: Table comparing VB theory to MO theory
As seen, the MO theory is much more effective in explaining formation of bonds between atoms than the VB theory.
It has been mentioned previously that the number of molecular orbitals formed is the same as the number of atomic orbitals involved in bonding. The total number of electrons in the molecular orbitals is therefore also the same as the number of electrons in the original atomic orbitals.
The filling of electrons into the molecular orbitals follow three basic rules:
- The Aufbau principle: Electrons are filled from the lowest energy orbital to the highest energy orbital. For example, atomic orbitals in atoms are filled from lowest energy to highest energy according to this order: 1s < 2s < 2p < 3s < 3p < 4s < 3d < 4p < 5s < 4d < 5p < 6s < 4f < 5d < 6p < 7s < 5f
- The Pauli Exclusion principle:
- No more than two electrons can occupy one orbital
- The two electrons must be of different spins
- Hund’s Rule: When there are degenerate orbitals, electrons will occupy empty orbitals before pairing up with another electron to minimize repulsion between particles of like charges
The following very interesting video will explain these three basic rules: