It doesn't matter that there was no sun or moon, there was still an evening and a morning, there was a beam of light shining on the earth from one direction, leaving the other side in darkness. This was God's work light so He could see what He was doing. See Genesis 1:5:
God called the light "day," and the darkness he called "night." And there was evening, and there was morning--the first day.
It has nothing to do with the sun and moon or what the future source of the light would be. Light is day, and darkness is night.
The purpose of light shining on one part of the earth was to de-thaw it and get it to the right temperature for supporting life. The source of this light was God Himself (see Revelations, no sun is needed in the new earth). Then God created the sun, which I suppose was His first "hands off" approach to a self sustaining universe.