Your “seems to suggest” is incorrect to me. The Bible does not provide us a chronological, fact-literal model of creation. That completely misinterprets the purpose and context of Genesis 1. The story comes ~3000 years ago and has no intestate in the some of the things we are preoccupied with. So when you ask who is right, your question presents an “either or” based on a false premise. Genesis 1 must be interpreted in context. That is the third option in what is often presented as a false dilemma.
The sun before the earth is not is not the only issue of where a literal interpretation of Genesis leads to errors. I wrote a piece outlining a lot of science errors in Genesis:
-
God creates the heavens and the earth together “in the beginning” but we now know that roughly 9 billion years separates the origin of our universe and the formation of the earth.
-
The earth is incorrectly described as being created before the sun. The earth and sun formed out of the same cloud of dust and gas (solar nebula) and that order should be reversed as the sun proper probably existed before the earth proper fully accreted.
-
The text describes there being evening and morning without a sun!
-
Describing the sun and moon as being created at the same time is also incorrect as the moon is thought to be the result of the coalescence of debris caused by the collision of a massive body with the early earth. This means the moon was formed after the earth.
-
It describes plants and fruit trees existing before the sun and the moon. Obviously sunlight is needed for photosynthesis and the sun must predate plants. Ancient authors would presumably understand the importance of sunlight for growing things which is probably a hint this is not meant to be a historical-scientific narrative. Though many other creation myths also do something similar in having night and day before the sun!
I went on to to describe 6 more errors in Genesis 1. Genesis 1 contradicts Genesis 2 when taken literally, there are many indications the creation stories are not meant to be taken literally and lots of parallels to ancient near east mythology. The problem is not that Genesis 1 is incompatible with science, the problem is not understanding its ancient context and purpose. Genesis has no interest in the questions modern readers impose upon it. Genesis is thematically formed and is interested in the form and function of things.
The true beauty of the creation accounts are diminished if we strip them from their ancient contexts and impose modern questions upon them they never intended to address. As Derek Kidner wrote in his commentary on Genesis, “The main point of Genesis 1 is about God. It is no accident that God is the subject of the first sentence of the Bible, for this word dominates the whole chapter and catches the eye at every point of the page: it is used some thirty-five times in as many verses of the story. The passage, indeed the Book, is about him first of all; to read it with any other primary interest (which is all too possible) is to misread it.”7 The Bible is not at all interested in the specifics of how God created the earth and the universe. The Bible is interested in teaching us correct theology about God amidst a polytheistic sea of rival suitors. It dumps them all on their heads and this is why the charge of lying is inapplicable. Bill T. Arnold captured the profound meaning of Genesis 1:1-3 in his commentary:
“We fail to appreciate the profundity of vv. 1–3 for two primary reasons, among several others. First, it is exceedingly familiar to those of us in the West, who still benefit from the long years of Judeo–Christian education and influence. Second, we have overemphasized the similarities between Gen 1 and the other ancient cosmogonies without fully appreciating the differences. This text soars above them in such a way as to deny implicitly any possibility of the theologies expressed in the Egyptian or Mesopotamian accounts. If we consider it an ideological polemic, we must admit it is not specifically so and only indirectly. It contains no theomachy, or cosmic conflict among the gods, or victory enthronement motif. Both are excluded by “in the beginning when God created . . . ”! Israel’s God has no rivals. There can be no struggle with forces opposed to his actions or corresponding to his power. There can be no victory enthronement motif because God’s victory was never in doubt; rather, God has never not been enthroned. There can be no enthronement portrait here because God has not become sovereign; he has simply never been less than sovereign.”8
You can glean a lot of information about Genesis from this thread I created:
Also, if interested I can link you to pdfs I put online of the same material. Neither Genesis 1 or 2 care about modern literal readings.
Vinnie