And God made the two great lights; the greater light to rule the day, and the lesser light to rule the night: [he made] the stars also. (ASV)
See Genesis 1:11, where God makes plants before the sun.
Also, technically, the moon does not give off its own light, as we all know. The Con side claims that the moon technically gives off "light" as electromagnetic radiation. Light, by definition, is a narrow band in (and thus a subset of) the electromagnetic spectrum that can be perceived by the senses. Neither the ancient writers who wrote Genesis, nor their immediate audience, would have any conception of the electromagnetic spectrum; and therefore any claim that light in this verse refers to anything other than "regular" light is mistaken.
The literalist interpretation of the Genesis account is unaffected by a mere 24-hour period of time devoid of natural sunlight. The claim also fails to note that light itself is said to have been created before anything else. It is therefore impossible to conclusively prove that this is an error unless two things can be proven to be true simultaneously; A. A "day" does not represent a literal 24-hour period of time, and B. The "light" of Genesis 1:3 was unsuitable for sustaining plant life.
Also, technically, the moon does give off it's own light in the form of electromagnetic radiation that is invisible to humans.
The greater light and the lesser light are an obvious reference to the sun and the moon. The author does not mention them by name, because these two celestial bodies were worshipped by other people living at the time. Here, they are treated as little more than "lamps" in the sky.