Ruling on saying “It is because of a lucky star that such and such happened”
Question

I hear some people saying, if something bad happens, “This is because of an unlucky star.” And if something good happens, they say: “This is because of a lucky star.” What is the ruling on saying such things?
Praise be to Allah.This refers to a star that appears in the sky. During the Jaahiliyyah, people thought that the stars influenced events on earth, so they would attribute events to the stars. This corrupt belief has come down to people in our own time, and they say things like this, but many people do not know what this means.
It says in Fataawa al-Lajnah ad-Daa’imah (26/368):
It is haraam to use the phrases “because of a lucky star” and “because of an unlucky star,” because this is attributing what happens in the universe, good or bad, to the stars, when in reality the stars have no impact at all and they are not a cause of good luck or bad luck. Allah, may He be exalted, says (interpretation of the meaning):
{Unquestionably, His is the creation and the command } [al-A‘raaf 7:54].
If the one who says that believes that these stars have an influence because of what they have of power, without Allah, may He be exalted, having anything to do with that, then this is major shirk. If he believes that all things are in the hand of Allah alone, but he merely says these words without thinking, then he has uttered words of shirk which are contrary to what is required of affirming the perfect oneness of Allah. The basic principle concerning that is the report narrated by Muslim in his Saheeh, according to which the Prophet (blessings and peace of Allah be upon him) said: “There is no ‘adawa (contagion except by the will of Allah), no haamah (an owl which came out of the grave of a deceased person), no naw’ (a star that rises at the setting of another) and no Safar (the Arabs had superstitions concerning the month of Safar – all these terms refer to superstitious beliefs among the Arabs before Islam).” And it is proven in as-Saheehayn that Zayd ibn Khaalid al-Juhani (may Allah be pleased with him) said: The Messenger of Allah (blessings and peace of Allah be upon him) led us in praying Fajr in al-Hudaybiyah following rainfall at night. When the Prophet (blessings and peace of Allah be upon him) finished his prayer, he turned to the people and said: “Do you know what your Lord said?” They said: Allah and His Messenger know best. He said: “ ‘Today some of My slaves are believers in Me and others are disbelievers. As for those who said, “We got rain by the bounty and mercy of Allah,” they are believers in Me and disbelievers in the stars. As for those who said, “We got rain by virtue of such and such a star,” they are disbelievers in Me and believers in the stars.’” End quote.
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said:
This is something that is said by one who does not know the teachings of Islam. He says to one who passes an exam: This is because of the lucky star. And if he failed the exam, he says: This is because of the unlucky star. This stems from astrology, which is a type of shirk, because the rising and setting of stars has no influence on earthly events; rather all matters are in the hand of Allah, regardless of whether a person is born during the time of a rising or setting star, or at any other time.
This person who claims that someone’s success or failure is due to a lucky star or an unlucky star is the type of person regarding whom the Prophet (blessings and peace of Allah be upon him) said that he is a disbeliever in Allah.
What the one who said that must do is repent to Allah from that, and the one who hears him should denounce him and explain that in public and private gatherings with young people, because some people do not know the meaning of these words and they do not know what they are based on." (Liqa’ al-Baab al-Maftooh  64/12).
And Allah knows best.