Lam Rules
Lam Qamariyyah ("Moon Letters") لَام قَمَرِيَّة
The lam of al- is pronounced clearly — when followed by 14 "moon letters" (mnemonic: ابغ حجك وخف عقيمه).
When al- is followed by any of the 14 "moon letters," the lam is pronounced normally with a sukoon (or the dot above it in some Mushafs). The next letter has no shadda. Mnemonic: ابغ حجك وخف عقيمه — every letter in this saying is a moon letter.
Quran examples
الْقَمَرُ
al + qaf → "al-qamaru". The lam is pronounced. · 54:1
الْحَمْدُ
al + ha → "al-hamdu". The lam is pronounced. · 1:2