The obvious question is: could there be a historical link between the 'seven luminaries' and the 'seven planets' of Western and Middle Eastern antiquity?
The answer is, yes. The most commonly accepted theory is that the use of the seven planets originated in ancient Mesopotamia and Egypt, was adopted by the Greeks and Romans, and then found its way to China. However, the specific route and timing is not clear. The Cihai (辞海), a Chinese encyclopaedia, carries the following entry for 七曜历 (七曜歴) qī yào lì, or 'seven luminaries calendar':
七曜历 qī yào lì, i.e., method of recording days according to the 七曜 qī yào. China normally observes the following order: sun, moon, Mars, Mercury, Jupiter, Venus, and Saturn. Seven days make one week, which is repeated in a cycle. Originated in ancient Babylon (or ancient Egypt according to one theory). Used by the Romans at the time of the 1st century AD, later transmitted to other countries. This method existed in China in the 4th century. It was also transmitted to China by Manichaeans in the 8th century from the country of Kang (康) in Central Asia (Note 3: The country of Kang).
The earliest use of the 'seven luminaries' (七曜 qī yào) is attributed by Cihai to Fan Ning (範寧 / 范宁), a scholar who lived from AD 339-401. Tellingly, the Chinese 'seven luminaries' were arranged in the same order as the Middle Eastern planetary names for days of the week, and not in the classic order of the Chinese five elements, which put water before fire.
Besides the Manichaean route noted by the Cihai, there was also an Indian route of transmission in the 8th century. The Chinese Buddhist monk Yi Jing (義凈 / 义净) and the Ceylonese or Central Asian Buddhist monk Bu Kong (不空, Amoghavajra) are both credited with referring to the seven-day cycle of planetary names in their writings, drawing on Indian sources. The Indians, in turn, appear to have taken this from the West.
Although there were several routes of transmission into China, it appears that the Indian route was the direct source of the Japanese names for days of the week. In 806, the famous Japanese monk, Kobo Daishi (弘法大師) brought Bu Kong's writings back to Japan along with a huge quantity of other Buddhist scriptures. Great interest was taken in Bu Kong's astrological work by Japanese astronomers, with the result that the planetary names found their way into Japanese calendars of the time. One such calendar was used by the Japanese statesman Fujiwara no Michinaga (藤原道長) for writing his diary in 1007, in which the present-day Japanese names for the days of the week can be found.
Although not in widespread use except for astrological purposes, this system of names was nevertheless maintained by the Japanese right through to the modern era. At one stage the days got out of kilter in eastern Japan and had to be rectified by a calendar reform in 1685. When they came under pressure to harmonise their working calendar with the West in the latter half of the 19th century, the Japanese turned to this old system to name the days of the week, officially adopting them in 1876. After this the names gradually came into general use in Japan.
In China, on the other hand, the planetary names largely died out. When the seven-day week was adopted under Western influence in the modern era, the Chinese turned to a completely different system to name the days of the week.