If the Sun was to dissappear, the Earth would freeze but the Earth has a lot of heat inside it in the molten magma and it would still take billions of years for that to cool off so a few people may be able to dig into the ground and continue to live on Earth. But it would be very bad news if the Sun was gone.
Without the Moon, our tides would be controlled by the Sun and be about a third the size they are now. If the Moon was to disappear then there would be tsunamis as the water raced to be in synch with the Sun instead of the Moon. The Moon stabilizes Earth's rotation like the Arms of a figure skater or the balance beam of a tightrope walker so without the moon, our axis would start flopping around the same way the Axis of Mars does. That means the seasons would keep changing, you might get night all year, you might get the equator freezing over. The Earth would also rotate faster and you'll have shorter days. It would be very inconvenient without the moon and many creatures would die, others will evolve, our crops would fail so we would have a hard time feeding ourselves for years and many people will die due to starvation but we could probably survive without a moon.