Stains on cloth diapers can be caused by many different things. The age of your baby, how they are fed, illnesses, medications, rash creams and more can all cause your diapers to retain some staining. The good news is that stains do not affect the utility of your cloth diapers so if they don't bother you, no action needs to be taken and they will often fade over time and subsequent washes. Think of a nosebleed on a white shirt. You can wash it out and the shirt will be clean, but you'll still have a stain. Because stains don't affect diaper function, they are not covered by warranties.
The Power Of The Sun
Even though they don't affect the utility of cloth diapers, stains can be unsightly, so to remove stains (if desired), use the sun. Wash your diapers and then lay them out wet in the sun to dry for several hours at a time (several times for tough stains). Direct sunlight is a very powerful, natural, safe and free way to 'bleach' your diapers and remove stains. If you have a stubborn stain, cut a lemon and squeeze some lemon juice directly on the damp diaper stain before laying it out in the sun. Lemon + Sun = Magic. It's really pretty amazing.
*** But do remember to re-wash your diapers after using lemon juice before using them again on baby if you're going to use this hack.
To sun your diapers, simply lay them out in the direct sunlight coming in from a window or hang them out to line dry or on a drying rack on a sunny patio. Yes it still works in the winter, if you use light from a sunny window, it just won't be as effective and might take longer.
You can also add Oxiclean or any other oxygen bleach to your wash on a semi-regular basis if you want to be proactive with stains. Or treat stains directly before washing with the all natural, Canadian made Bunch a Farmers Stain Stick.
Chlorine bleach may be used on synthetic fabrics only and even then it should be a last resort and diluted before use (it will void warranty on some brands). But in reality you probably won't ever need to use it because some lemon, the sun or a Bunch A Farmers stain stick will treat most stains perfectly and are very effective.
Avoiding Cloth Diaper Stains
If you want to avoid heavy staining in the first place, consider disposable or fleece liners or have only synthetic fabrics in your diaper stash (microfibre, microfleece, microsuede or Athletic Wicking Jersey (AWJ) because natural fabrics will stain more readily than synthetics.