Good method when you've added too much detergent
It is typically recommended to use 1/4 the amount of detergent with your cloth diapers and to use the recommended amount of detergent if using a detergent formulated specifically for cloth diapers. You may need to fiddle with this amount, as those with soft water or HE machines may need even less detergent. Those who are new to cloth diapering are more prone to adding excessive detergent. If you notice bubbles forming during your wash cycle, an immediate wash in hot water (or additional rinsing) can remove this detergent before it creates a build-up issue.
Not a solution to all problems
If you do not notice excessive bubbles coming out of your diapers when washing them without detergent, the diapers may need a more rigorous method of stripping (such as RLR, Dawn, or Oxiclean) to help loosen and remove trapped particles. While hot water washes or additional rinsing can remove minor build-up problems, issues which have taken months to develop will also take harsher methods to treat. Check with your diaper manufacturer for the preferred method of stripping diapers. Most manufacturers recommend a secondary method of stripping if hot water washes have failed to resolve the issue.