spending a long time in the sun is dangerous and can give you skin cancer. But on the other hand, not spending enough time in the sun is also bad for you, as sunlight helps us to produce vitamin D. This vitamin is important for strong bones and a healthy immune system, and it also makes people feel happier.