cloudiness can be caused by many things - bacterial bloom from interrupted cycle or overfeeding, cloudiness from the spoiling food itself, overstocking, too much light (algae bloom), improper filtration or a proper filter that is clogged up or bypassing (not maintained), cloudy tap water, dirty substrate, sand or gravel that wasn't rinsed enough before adding, medications, etc.
make sure your filter is working properly. upgrade if necessary. add carbon. do bigger water changes more often. be careful about feeding. make sure your tank size is suitable for the fish you have. gravel vac every time you do a water change. invest in a diatom filter which polishes the water.