The sun, along with the rest of the solar system, was made when a nearby supernova exploded and send shockwaves through a cloud of interstellar dust, which then collapsed, forming the planets, the sun and the asteroid best. If it were to suddenly disappear, the planet would stop going in circles and go in a straight line instead. Most life on earth would die, because plants rely on the sun for energy, and plants are at the bottom of the food chain.
The sun formed around 4.5 billion years ago when a giant molecular cloud began to collapse in on itself under the force of gravity. Most of the mass of that cloud collected in the center, forming the Sun, and the exterior of the cloud went on to form the other bodies of the Solar System.
If it wasn’t here, then it is almost certain then no life would have evolved on earth.
Interestingly, in around 5 billion years time, the sun will enter the dying phase of its life cycle, and begin to expand into a red giant. It is safe to say that, in this circumstance, any life remaining of earth will be wiped out.