Various types of mold and fungus can cause yellow growth on top of your soil. Although the yellow growth usually won't harm the plant, it gives the soil an unhealthy appearance.
Leucocoprinus birnbaumii, also known as Lepiota lutea, is a yellow fungus that commonly grows on the surface of potting soil, often turning into large, bright yellow mushrooms. The fungus is usually present in commercial potting soil, and is completely harmless.
Dog Vomit Slime Mold
Dog vomit slime mold (Fuligo septica), is often found growing outdoors on top of soil, especially if the soil has been mulched with bark chips.The mold is harmless to humans and pets, and is difficult to eradicate, as removing the mold only allows room for more mold to take its place.
Coping with Yellow Fungus
The best way to cope with yellow fungus is to stop fighting and learn to accept the unusual growth. Removing bark mulch from the top of outdoor soil may help, but probably only temporarily. You can also allow houseplant soil to dry as much as possible before watering, which may or may not remove the yellow fungus.