The reason for degassing your gels is to remove oxygen. Oxygen in the gel interferes with polymerisation, slowing it down and making it less consistent, so degassing makes it faster and more uniform.
From the EncorBio SDS-PAGE protocol:
Polymerization is quicker and more uniform if you degas the first three solutions for a few minutes in an Ehrlenmeyer flask on a house vacuum prior to addition of the last three reagents. Molecular oxygen inhibits polymerisation by reacting with the free radical SO4- ions, which is actually the reason why PAGE gels are poured in tubes or between plates and not in open top horizontal apparatuses, as can be done with agarose. Also it's a good idea to layer some isopropanol on top of the gel as this prevents oxygen getting in and inhibiting polymerisation.
Oxygen can also lead to oxidation of protein products, which might be crucial if you then want to extract the products and use them for something else (e.g. Sun & Anderson, 2004).
Finally, having bubbles in your gel can distort the results and make them less reproducible, as the bubbles will not form consistently with each repetition and they disrupt the physical medium of the polyacrylamide. So another purpose of degassing is to ensure repeatability.
The Bio-Rad acrylamide polymerisation info sheet has the best info I could find:
The formation of polyacrylamide gels proceeds via free radical
polymerization. The reaction is therefore inhibited by any
element or compound that serves as a free radical trap
(Chrambach 1985). Oxygen is such an inhibitor. Oxygen,
present in the air, dissolved in gel solutions, or adsorbed to
the surfaces of plastic, rubber, etc., will inhibit, and in extreme
cases prevent, acrylamide polymerization. Proper degassing
is critical for reproducibility. Therefore, one of the most
important steps in the preparation of polyacrylamide gels is
the evacuation, or “degassing” of gel solutions immediately
prior to pouring the gel. This is done by placing the flask of
gel solution in a vacuum chamber or under a strong aspirator.
In some cases, a vacuum pump may be required.
Buffer stock solutions and monomer stock solutions are usually
stored at 4°C. Cold solutions have a greater capacity for
dissolved oxygen. The process of degassing is faster and
more complete if the gel solution is brought to room
temperature (23–25°C)‚ before degassing begins.
Furthermore, if a cold gel solution is placed under vacuum,
the process of evacuation tends to keep the solution cold.
Pouring a gel with a cold solution will have a substantial
negative effect on the rate of polymerization and on the
quality of the resulting gel.
Polymerization in which riboflavin is used as one of the
initiators calls for degassing. The conversion of riboflavin from
the flavo to the leuco form (the species active in initiation)
actually requires a small amount of oxygen (Gordon 1973).
This explains why polymerization initiated primarily by riboflavin
can be completely blocked by exhaustive degassing. However,
oxygen in excess of that needed to convert riboflavin to the
active form will inhibit polymer chain elongation, as it does in
reactions initiated only by ammonium persulfate and TEMED.
Thus, while degassing is still important for limiting inhibition,
it must not be so extensive that it prevents conversion of
riboflavin to the active form. For polymerization initiated by
riboflavin/TEMED, or riboflavin/TEMED/ammonium persulfate
systems, degassing should not exceed 5 min.
A consequence of the interaction of riboflavin with oxygen is
that riboflavin seems to act as an oxygen scavenger. This is
supported by the observation that the addition of riboflavin
(5 µg/ml) to stacking gel solutions containing ammonium
persulfate/TEMED initiators results in cleaner, more uniform
polymerization at gel surfaces exposed to oxygen (such as
combs). The same effect could likely be achieved by more
thorough degassing of solutions without riboflavin.
Whether using chemical polymerization (ammonium
persulfate/TEMED) or photochemical polymerization
(riboflavin/TEMED or riboflavin/TEMED/ammonium persulfate
initiators), reproducible gel quality and separation
characteristics require careful attention to gel solution
temperature before degassing, and to degassing time,
temperature, and vacuum. These parameters should be
kept constant every time gels are prepared.
Sorry for the long quotes, but they are pasted here in case the original sources disappear.