I'm not expert but there is rule reading the AL. There are 2 types of letters in arabic. Shamsi letters and Qameri letters. Sun and moon letters literally. Qameri letters are written like 'Al Qamer' and read like 'Al Qamer'. Shamsi letters are written like 'Al Shams' and read like 'Ash Shams'. Like the initial letter of the word. Some shamsi letter sounds are S, SH, T, Z. Please search for the correct shamsi letters list online. That's all I can say :)
The ل letter in الـ can be pronounced or skipped with an emphasis on the successor letter. It ia called solar and lunar lam اللام الشمسيه والقمرية Nothing to do with Space, just because the words for sun and moon are the most notable examples. When you say The Sun in Arabic it is الشمس Aʃˈʃams and The Moon is القمر Alqamar. There is a lovely phrase to sums it up "إبغ حجك وخف عقيمه" these 14 letters when الـ is added in a word that starts with them, the lam is pronounced. Any other letter the lam is silent and emphasis is in palce. Hope this was helpful. Happy learning and good luck. Peace.