The sun is physically essential for human existence, providing the light and heat that make life on Earth possible through processes like photosynthesis, which forms the basis of the food chain and drives the climate [1].
God, as a spiritual and theological concept, is considered more important to human existence from a faith-based perspective. For believers, God is often seen as the source of all existence, the creator of the sun and life itself, and the giver of meaning, morality, and salvation [1].
Ultimately, the answer depends entirely on whether one views the question from a purely scientific/materialistic viewpoint or from a religious/spiritual viewpoint [1]. Science details the physical mechanisms of the universe, while religion addresses questions of ultimate origin, purpose, and value.