As for the seven heavens, they are populated by the angels, as Allaah says (interpretation of the meaning):
“Nearly the heavens might be rent asunder from above them (by His Majesty), and the angels glorify the praises of their Lord, and ask for forgiveness for those on the earth. Verily, Allaah is the Oft‑Forgiving, the Most Merciful”
“But if they are too proud (to do so), then there are those who are with your Lord (angels) glorify Him night and day, and never are they tired”
Al-Tirmidhi (2312) narrated that Abu Dharr (may Allaah be pleased with him) said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Verily I see what you do not see and I hear what you do not hear. The heaven is creaking and it should creak, for there is no space in it the width of four fingers but there is an angel there, prostrating to Allaah. By Allaah, if you knew what I know, you would laugh little and weep much, and you would never enjoy women in your beds, and you would go out in the streets, beseeching Allaah.” Classed as hasan by al-Albaani in Saheeh al-Tirmidhi.
In al-Saheehayn it is narrated from Maalik ibn Sa’sa’ah, in the story of al-Isra’ wa’l-Mi’raaj (the Prophet’s Night Journey and Ascent into heaven): “ … Then the Much-Frequented House (al-bayt al-ma’moor) was raised up for me, and I said: ‘O Jibreel, what is this?’ He said: ‘This is the Much-Frequented House. Every day seventy thousand angels enter it and when they depart from it, they never return to it.” Al-Bukhaari (3207) and Muslim (164).
This has to do with the heavens. As for the planets and other galaxies, our answer is to say:
Allaah knows best.