Name and why it is called so
The surah takes its name from its first verse, "Wal-layli idha yaghsha" (By the night as it covers). In the hadith it is mostly referred to by these words. Sahih al-Bukhari reports that Alqamah, a student of Abdullah ibn Mas'ud (may Allah be pleased with him), said that his teacher used to recite the third verse as "wadh-dhakari wal-untha," and Abu al-Darda' (may Allah be pleased with him) said, "I too heard it like this from the Prophet ﷺ." According to the scholars, this reading was later abrogated, and the mass-transmitted (mutawatir) reading of the Uthmani mushaf is "wa ma khalaqadh-dhakara wal-untha" (and by Him who created male and female), which is the one given in the text of Surah Al-Layl.
Time of revelation and background
This surah was revealed in Mecca, when the Muslims were weak and some believers spent their wealth to free slaves. Al-Mustadrak of al-Hakim (3986) has a narration from Abdullah ibn al-Zubair (may Allah be pleased with him), whose chain its editor graded hasan, that Abu Bakr al-Siddiq (may Allah be pleased with him) used to free weak slaves, so his father Abu Quhafah advised him to free strong men who could defend him; at this, the verses from "Fa amma man a'ta wattaqa" (As for him who gives and fears Allah) to the end of the surah were revealed about him.
Main themes
After the oaths, Allah declares that your efforts are diverse. The one who gives in Allah's way, fears Him and affirms the best, We will ease him toward ease; and the one who is stingy, thinks himself free of need and denies the best, We will ease him toward hardship. Sahih al-Bukhari narrates from Ali (may Allah be pleased with him) that the Prophet ﷺ, speaking about divine decree, said: Do good deeds, for everyone is eased toward what he was created for, and then he recited these very verses.
Then Allah says that guidance is upon Us, and to Us belong the Hereafter and this world. He warns of a blazing Fire that none will enter except the wretched one who denied and turned away, while the God-fearing one will be kept far from it: he who gives his wealth to purify himself, not to repay anyone's favor but only seeking the pleasure of his Lord, the Most High, and he will surely be pleased. This is the essence of the tafsir of Surah Al-Layl.