#sp^2# and #sp^3# indicate the number of #s# and #p# orbitals mixed to create new, degenerate hybrid orbitals.
#\mathbf(sp^2)#-hybridized bonding
For instance, #"H"_2"C"="CH"_2# involves two #sigma# bonds (one for each single bond), and then one #sigma# and one #pi# bond (used in one double bond), so three electron groups are needed, but 4 electrons need to be donated by carbon.
Since carbon has 4 valence electrons, but its #p# orbitals (which are highest in energy) only contain 2, it needs to mix two of the three #2p# orbitals with the #2s# orbital to make use of 2 more valence electrons.
This is favorable because it involves the lowering of the energies for two of the #2p# orbitals, increasing stability.
This results in the usage of three #sp^2# hybrid orbitals to bond: the ones with one electron for #sigma# bonding to hydrogen or the other carbon, and the #2p_z# for #pi# bonding with the other carbon.
1 #2s# orbital had been incorporated, and 2 #2p# orbitals had been incorporated, so it is called #sp^2#, having #33%# #s# character and #66%# #p# character.
#\mathbf(sp^3)#-hybridized bonding
A similar reasoning follows for #sp^3# bonding. Let's take #"CH"_4# as an example. It needs four electron groups, and it needs to make four IDENTICAL #sigma# bonds (one for each single bond).
4 valence electrons are needed from carbon, but only 1 electron needs to be contributed per #sigma# bond. So, we need four separate degenerate hybrid orbitals to make each #sigma# bond.
Therefore, all three #2p# orbitals must mix with the #2s# orbital and stabilize in energy overall to get four degenerate hybrid orbitals.
This results in the usage of four #sp^3# hybrid orbitals to bond: the ones with one electron allow #sigma# bonding to hydrogen.
1 #2s# orbital had been incorporated, and 3 #2p# orbitals had been incorporated, so it is called #sp^3#, having #25%# #s# character and #75%# #p# character.