Sun letters and Moon letters in Arabic
In the Arabic alphabet, there are 28 letters; 14 of them are the so called Sun Letters (حُرُوف شَمْسِيّة), the other 14 are the Moon Letters (حُرُوف قَمَرِيّة). Depending on whether a word starts with a Sun Letter or a Moon Letter, the article ال is pronounced differently.
The rules for this are quite simple:
If a word starts with a Moon Letter, ال is pronounced al.
If a word starts with a Sun Letter, you do not pronounce the ل (lam; like the english letter l) in the article ال. What happens here is that the ل is assimilated. Instead, you pronounce the first letter of the word, the Sun Letter, with a ّ - a shadda; that means it’s pronounced twice, like in the word الشَّمْس (ash-shams; the sun) for example or in الرَّجُل (ar-rajul; the man).
These are the Moon Letters:
أ ب ج ح خ ع غ ف ق ك م ه و ي
And these are the Sun Letters:
ت ث د ذ ر ز س ش ص ض ط ظ ل ن
Now, technically speaking, you have to memorize them. There’s not really a way around it; but maybe you can make out some patterns as to which letters are Sun Letters and which ones are Moon Letters. For example, you might notice that a lot of Moon Letters tend to be pronounced in the back of your mouth or your throat whereas your tongue plays a more important role in pronouncing the Sun Letters. They’re pronounced in a way that would make it difficult for you to pronounce them together with the letter ل. Try saying al-schams (الشَّمْس; the sun) instead of saying ash-shams or al-rajul (الرَّجُل; the man) instead of ar-rajul and you might realize it’s more difficult than saying for example al-qamar (القَمَر; the moon) or al-bait (لبَيت; the house).
I do recommend you practice these if memorizing things isn’t for you. To help you, I have compiled a list with words that start with Sun Letters and words that start with Moon Letters. Knowing example-words that start with the letters in question helps me personally remember which ones are Sun Letters and which ones are Moon Letters the best so maybe it’ll help you too!
(Feel free to point out mistakes or suggest corrections and bear with me because of the transliteration. I’ve only ever learnt how to do it in German.)