Allah has created the seven heavens in tiers and has made the moon a light therein, and made the sun a lamp.
meaning, He made a distinction between them (the sun and moon) in reference to their lighting. He made each one of them in a set manner with a distinct quality so that the night and day may be known. They (the night and day) are known by the rising and setting of the sun. He also determined fixed stations and positions for the moon, and He made its light vary so that sometimes it increases until it reaches a maximum, then it begins to decrease until it is completely veiled. This shows the passing of months and years.
This is as Allah said,
هُوَ الَّذِى جَعَلَ الشَّمْسَ ضِيَأءً وَالْقَمَرَ نُوراً وَقَدَّرَهُ مَنَازِلَ لِتَعْلَمُواْ عَدَدَ السِّنِينَ وَالْحِسَابَ مَا خَلَقَ اللَّهُ ذَلِكَ إِلاَّ بِالْحَقِّ يُفَصِّلُ الايَـتِ لِقَوْمٍ يَعْلَمُونَ
It is He Who made the sun a shining thing and the moon as a light and measured out for its stages that you might know the number of years and the reckoning. Allah did not create this but in truth. He explains the Ayat in detail for people who have knowledge. (10;5)
Concerning Allah's statement,
وَاللَّهُ أَنبَتَكُم مِّنَ الاْاَرْضِ نَبَاتًا