Hi. It depends what you mean. All of the energy on the Earth basically comes from the Sun. This is what heats the planet and drives the weather (so it is how we get energy from renewables). The Sun is also ultimately responsible for all of the fossil fuels that we dig out of the ground and burn (if there was no sun then there would be no plants/animals that are the source of the fossil fuels). If the sun were to suddenly disappeared then this would happen:
So we would actually survive for a long time, but it would be very cold and dark. We could continue to burn fossil fuels to provide some heat and light, but eventually they would run out and we would need to retreat underground or to the deep ocean so that we were closer to the core of the Earth which would still be warm.