This interesting page reviews Jewish readings of Genesis 1 and in this article by Dr. Rabbi Zev Farber focuses on the distinction between light on Day 1 and the Sun on Day 4 of creation. To quote an extract from the article:
The view of light and darkness as physical entities that cause day and night can be found in at least one ANE text as well. In a fragmentary Sumerian tablet (NBC 11108) from Nippur during the Ur III period (21st cent. BCE), we find the following:
When Anu, the lord, made heaven shine, made earth dark… Heaven and earth he held together as one… Day did not shine; in night, heaven stretched forth. Earth, bringing forth plant life did not glow on its own…
The text describes the Sumerian high god Anu’s creation of the world. When Anu separates heaven and earth, the heavens shine but the earth does not. In other words, when the heavens and earth were combined in the primordial mush, there was perpetual night. By separating the heavens from the earth, Anu also separates light from darkness.
Wayne Horowitz notes the parallel with Genesis:
In NBC 11108:8, as in Genesis, where day exists before the creation of the sun, moon, and stars, the heavens are conceived to have had their own glow, irrespective of the presence of luminaries. 
The article reviews a range of historical interpretations before suggesting the meaning is rooted in the understanding of the physical world which existed at the time rather than in physical fact.
This resolves the problem of the light being created and days happening prior to the sun’s existence.