The sun influence the formation of soil as due to the sun the temperature increases and during the sun set the temperature decreases. Because of this increase and decrease in temperature the contraction and expansion of rock take place. Due to which the rocks gets weathered.
The wind also influence the formation of soil because due to the increase in the flow of wind the rock gets easily weathered.
Hope this answer is helpful:)
Regards...