Here's the breakdown:
* The Sun did form from a giant cloud of gas and dust. This cloud, called a nebula, was mostly hydrogen and helium, with traces of other elements.
* The Sun itself is not a cloud, but a giant ball of hot, glowing gas. The gas is mostly hydrogen and helium, which fuse together in the Sun's core, releasing enormous amounts of energy.
* The Sun's energy is what keeps the Earth warm and allows life to exist.
So, while the Sun didn't form from a cloud in the same way that a rain cloud forms, it did come from a massive, swirling cloud of gas and dust.