The leaves change colour as they die. A tree sheds its leaves before the winter by taking back all the moisture and cholorophyl in the leaves into the trunk.
In many parts of the world, like most of the UK, the winter leads to frost, and this means the water in the leaves will form ice crystals, which would damage the leaves, and the tree needs light and liquid water to make energy in the form of glucose (a sugar).
Chlorophyl is a molecule in the leaves that uses sun light to turn carbon dioxide and water into glucose. Chlorophyl is green, and this is taken back by the tree in the winter. The glucose left in the leaves also turns red, and the brown is from the leaves decaying just before they are shed. http://www.sciencemadesimple.com/leaves.html
Lightnight: This is caused by a difference in the electrical charge of two different places. So if the inside of a cloud is very different in charge from a tree, then the electricity will flow between the two to even out.
This is because nature likes to even things out, until everything is flat – minimise energy.
This is like: “Why does a ball fall when you throw it up?”
That happens because the ball has potential energy, and this is minimised by the ball falling. Many things in nature are about minimising potential energy.
This is the same reason why we have to eat to stay alive: the energy is constantly flowing from us (warm) to the surroundings (colder). So it falls from the hot thing (a high energy place) to the cold thing (a low energy place).