Amina Inloes, Amina Inloes is originally from the US and has a PhD in Islamic Studies from the University of Exeter on Shi'a hadith. She is the program leader for the MA Islamic Studies program at the... Answer updated 1 year ago

This is a complicated question that is blurred by two things. First, historically, Muslims have tended to have different views on this. Some Muslims have opposed astrology, and others, especially those of a more mystical inclination, have accepted it. 

This is also complicated by the scientific viewpoint of modernity. Today, it is considered bad science to believe in astrology, and so many Muslims will reject it to avoid seeming backwards. Even in ancient times, scholars disagreed whether astrology is factually valid (that is, whether it is an accurate science of inquiry or not); however, there were aspects of an astrological worldview that were common in many fields such as medicine in the Muslim world and Europe. Therefore we find things about timing that, today, would be considered "astrological" in works such as Tibb al-Rida (A), although such things were considered scientific not "astrological" back then.

(This is apart from the fact that, in older times, people tended to rely more on the stars for basic timings of life such as when to plant, predicting weather, and so forth.)

Furthermore, in the pre-modern era, Muslims, like others, tended to hold a worldview in which the cosmos was seen as united and meaningful. Therefore, there was no philosophical problem in holding that the positions of the planets or stars might have some relationship to what happened to human beings. In today's materialistic model of the universe, however, where everything is seen to be independent and lacking inherent meaning or connection, this idea does not make sense and hence tends to be dismissed as superstition. 

In any case, regardless of the fact that there were varying viewpoints on astrology in earlier eras of Islam, it clearly was influential in the classical Muslim era. For instance, both Baghdad and Cairo were founded at times that were determined astrologically in hopes it would contribute to the success of the cities. Astrology was also heavily influential in the Ottoman, Safavid, and Mughal Empires, and it is really only in the past century that it has disappeared from public view.

Jurisprudentially, there is a Sunni hadith which narrates that the Prophet (S) said: ""Whoever seeks knowledge from the stars is seeking one of the branches of witchcraft…” So, from a Sunni angle, if one accepts that hadith, it would seem to be against astrology. That said, I personally am skeptical that the Prophet (S) actually said that, but to each their own.

Shi'i hadith texts are more complicated on the subject as the Imams were said to have knowledge of all things and that included the science of the stars.

The difference between Sunni and Shi'i texts may also be because astrology was more prominent and developed in the regions which Islam expanded to after the time of the Prophet (S), and astrological texts were part of the texts that were translated during the translation movement of the Abbasid era. So, since the Imams were alive during that time, there were more discussions about it. 

Apart from that, the main theological concerns over astrology seem to be:

(a) Shirk - that is, believing that the planets/stars have more control than Allah and/or worshipping the planets/stars [as is attributed to the Sabaeans].

This has been a shared concern by Muslims and Christians and historically has been refuted by those who accept astrology by saying that the stars/planets are a lens for divine power, or under the control of Allah, and not independently acting entities.

(b) Astrologers make mistakes and have varying levels of skill in their craft and differences of opinion on how to practice it; some are outright liars or try to manipulate kings.

Also, I would add, some things that are said in the name of astrology are really quite silly; for instance, there is a lot of silliness on some blogs and social media sites today. Whether or not one accepts astrology as a valid science, it still has internal rules that were taught and agreed upon, and so one can still evaluate whether or not it is being done "correctly" according to the historical rules of the art, or if someone is just making fiction up entirely.

(c) To discourage unhealthy dependency on fortune-tellers or soothsayers and to discourage a culture whereby someone always consults a fortune-teller before making a decision or is obsessed about these things.

(d) To avoid losing hope in God and feeling that everything is predetermined and there is no role for prayer; and/or avoiding self-fulfilling prophecies (being told something negative and subconsciously living it out).

From a Shi'i fiqh perspective, there are different views. (This is also complicated by the fact that there have historically been various uses of astrology, and some might be considered permissible and others impermissible.) To my knowledge, Ayatollah Khamene'i allows the practice of astrology as long as the astrologer conditions what they say with the clause that everything is in the hands of Allah (rather than claiming that his or her statements are absolute or interfere with Allah's right to decree and establish fate, or that the planets/stars themselves control things).  

An interesting historical text which discusses astrology from a religious perspective is Faraj al-Mahmum fi 'Ilm al-Nujum by Ibn Tawus, and if one looks quite hard, one can find an English translation of it (or at least a partial translation).

Those are a few insights - hope they help!