This may have come up in some earlier posting, but if so, I would not know how to search for it with any efficiency. But I'll go ahead anyway:
Day 1: Day and night
Day 2: Sky and sea
Day 3: Land
Day 4: Sun and Moon
Day 5: Birds and fish/sea-monsters
Day 6: Land-animals/humanity
Day 7: The first Sabbath in the history of the Universe, celebrated by a very satisfied Deity
Notice the correspondence -- the first three days are the creation of environments, while the second three days are the creation of the inhabitants of each environment created three days before. Yes, Gen 1:16 pictures the Sun as an inhabitant of the day, and the Moon an inhabitant of the night.
Turning to other creations, plants are created as environment items rather than as inhabitants. They are created in Day 3, with the Earth being commanded to produce them, and they are made available for various inhabitants in Day 6, the corresponding "plant inhabitant" day.
About the stars, being created in the second three days means that they are inhabitants. And being celestial, they are created in Day 4, almost as an afterthought.
This explains a variety of oddities:
Separation of light/day from darkness/night
Creation of daytime 3 days before the Sun was created
Creation of plants before the Sun
Creation of birds before land animals
And it clarifies the status of plants and why they are not viewed as really alive -- they are viewed as environment rather than as inhabitants.
The Genesis 2 creation story, however, does not seem quite as schematic.
Someone else had posted here about various schematic-looking numbers in the Bible; Genesis 1 might be interesting to add to that.