Bleach turns items yellow or white because the chemicals present in bleach oxidize materials on contact. The chemicals present in liquid bleach contain oxygen molecules and when released onto colored clothing, it inhibits the reflection of visible colors.
The chromophore molecules in different objects are responsible for reflecting different colors from the visible spectrum to create the illusion of colored objects. During oxidation, the chemical bond holding the chromophore molecules together is broken up and can no longer reflect colors within the visible spectrum. We perceive this lack of color to be white or yellow.
A similar phenomenon takes place when clothing is left out in the sun for long periods of time. While the sun does not oxidize clothing like bleach does, the energy from the suns ultraviolet rays has the ability to break up the chromophore molecules as well and stop the reflection of color.
There are many different varieties of bleach available in the market. Sodium hypochlorite-based bleach is the most commonly used liquid bleach in households today, and it is popularly known as chlorine bleach. Hydrogen peroxide-based bleach, known as oxygen bleach, is also popularly used. Calcium hypochlorite is a chemical used in powered bleach to whiten clothing and disinfect the kitchen and bathroom areas.