That streak of light is called a meteor. It is caused by a rock in space that hits the earth's atmosphere and is heated so much by the air they glow and sometimes burn up completely. While the rock is still in space, it is called a meteoroid .
Many meteoroids come from comets, which are made mostly of ice and rock.
As a comet travels close to the sun some of the ice melts and pieces of rock come loose. These pieces of rock then become meteoroids, traveling through space on their own. Sometimes they come close enough to the earth to get caught by earth's gravity, and become a bright meteor streaking through the sky. Meteors heat up quickly in the atmosphere because of friction with the air. Try rubbing your hands together as fast as you can, back and forth.