In case anybody else is confused by the spelling of بالليل: It seems like this word is actually made up of three parts:
- بِـ: a preposition which most commonly means “with” but can also mean “in (a state)”. Like و “and”, this preposition appears to usually be attached directly to the following word without a space
- the definite article الـ. As usual, the “a” vowel is deleted if preceded by a vowel (in this case the “i” of the preposition), but the ا is still kept in the spelling. Also the ل of the article is interpreted as assimilated to the following ل of the noun. This is why the ل of الـ is not pronounced but the following one gets a ّ. So basically the same thing as in words like اَلنَّوْم, only here with a noun starting in ل rather than ن.
- the actual noun لَيْل “night”
So literally it’s something along the lines of “in [a state of] the night”