The sun is a scientific means of God creating light. He created the sun, in which turn created light. Also realize that the sun isn't the only light in the universe, there are many other stars out there besides the sun.
To be used to separate the day from the night and to be used by mankind for marking off seasons, days, and years. This is written in the perspective of the inhabitants of the earth and for their benefit. So a formless earth was being formed and as it was being formed more of what God wanted for mankind was developing; Again, all in the perspective of the inhabitants, so the fourth day could be describing the formation of the atmosphere to reveal these lights, to the intended state of development, that were already present before the fourth creation 'day'. The light before can be the development of stars and other sources of light with the possible purpose of showing the beginnings of a 'dark' and 'formless' (perhaps no matter) universe into a universe with form and light.
In a similar vein, in the story of the birth of Buddha, when Buddha entered the womb from his lofty place in Tushita heaven, for the first time was there light in the world. And other creatures for the first time realized that they weren't alone and they thought, "Oh, you're here too?" I didn't make that up. Whether you like Buddha or not. It's still a beautiful tale. You may say, "Hey, what right do you have to speak of Buddha here in the Christian area?!" But the fact is that if Buddha hadn't broken with Vedic priesthood and made Enlightenment available to everybody, Jesus wouldn't have broken with Jewish tradition and made 'God's Covenant' available to everybody, with or without foreskin.
I've often wondered about this. There really is no way to weasel out of it; the text says God made light before He made anything capable of producing light. It also claims He made the earth before the stars, which makes absolutely no sense, since the matter/energy of the stars determines the laws of creation. Not so sure God's as concerned with us understanding everything as we are. "You are not here to "get it," Mr. Burton.
Like i say, light is awareness, that makes all those other things visible. You are a creature of light. If the eye be sound, the whole body will be full of light.
The first generation of the universe were the Massive first generation stars, that finally burned themselves out and collapsed in upon themselves, leaving only massive centrally condensed Black Holes, that eventually fell in toward each other into one seemingly bottomless pit, in which those stars were condended into the infinitrly dense, infinitely hot, infinitesimally small singularity, from which that first generational universe was created, when that singularity was spatially separated by that which we call "The Big Bang" The second generation or the second period of universal activity, began the same as the first, only this time evolving a little further, and when the first generation stars collapsed after blasting off a percentage of their mass, from the nebula cloud of elements that has been created in those massive nuclear reactors, divisions occured in the great nebula clouds, that were trapped in orbit around the centrally condensed black holes into which the greater percentage of the mass of those stars had collapsed, and Planets, solar systems, and stars were created from the divisions of the elements/waters, etc.The second period of universal activity came to its end when all that had been created, was once more condensed into the singularity of origin in what is called "The Big Crunch."
Universe after universe is like an interminable succession of wheels forever coming into view, forever rolling onwards, disappearing and reappearing; forever passing from being to non-being, and again from non-being to being. In short, the constant revolving of the wheel of life in one eternal cycle, according to fixed and immutable laws, is perhaps after all the sum and substance of the philosophy of Buddhism. And the eternal wheel has so to speak, six spokes representing six forms of existence.” Mon. Williams, Buddhism, pp. 229, 122. The days and nights of Brahma are called Manvantara or the cycle of manifestation, “The Great Day,” which is a period of universal activity, that is preceded, and also followed by ‘Pralaya,’ a dark period, which to our minds seems as an eternity. Manvantara , is a creative day as seen in the six days of creation in genesis, ‘Prayala,’ is the evening the preceeds the next creative day. The six days of Creation and the seventh day of rest are referred to in Genesis 2: 4; as the generations of the universe. The English word “Generation,” is translated from the Hebrew “toledoth” which is used in the Old Testament in every instance as births, or descendants, such as, “These are the generations of Adam,” or “These are the generations of Abraham,” and these are the generations of the heavens and earth/universe. And the great day in which the seven generations of the universe are eternally repeated, is the eternal Cosmic period, or the eighth eternal day in which there is neither hours, days, weeks, months, or years, where all time is stuck together in one aeon, and all who are not cast back into the refining fires of the eternal revolving seven cycles, will enter into the eighth eternal generation of Light. In the generations of the universe, we see a series of worlds following one upon the other, each world rising a step higher than the previous world, so that every later world brings to ripeness the seeds that were imbedded in the former, and itself then prepares the Cosmic seed for the universe that will follow it. Every universe from the first to the last, from the smallest to the greatest, that have been created throughout the aeons of eternity, still exist in their independent Space-Time positions within the eternal and boundless Cosmos.