Some mosses can survive in full sun, though most prefer shade. Moss can grow on any type of soil because their shallow roots simply hold the moss there without drawing nutrients from the soil. They get some nutrients from water, but mostly they make their own food through photosynthesis.