The lulav is taken by day, not by night. It is customary to take the lulav at Shaḥarit. However, if one did not take it then, he should take it later. If the sun has already set, he should take it without reciting a berakha. Once the stars are out, he has lost the mitzva for the day (SA 652:1; MB ad loc. 2).
It is a mitzva to take the lulav while reciting Hallel and to shake it while reciting the verses, “Hodu la-Shem ki tov ki le-olam ḥasdo” (“Thank the Lord for He is good, for His kindness endures forever”) and “Ana Hashem hoshi’a na” (“Lord, please, save us”). The Sages instituted a berakha to be recited before taking the lulav. While it is generally recited before Hallel, some recite it earlier, before prayers, in the sukka (section 3 below).
Le-khatḥila one should not take the lulav before sunrise. However, if one needs to set out early and will not be able to take the lulav after sunrise, he may take it and recite a berakha once dawn has broken (SA 652:1; Peninei Halakha: Prayer 11:2 note 1).
As we have seen (4:1), the Torah commands us to take the lulav on only the first day of the festival. Only in the Temple was there a mitzva to take it all seven days. During Temple times, everywhere in the world except for the Temple, the lulav was taken only on the first Yom Tov; during the rest of the festival, only pilgrims to the Temple took it. If the first day of the festival was on Shabbat, those living in Eretz Yisrael still took the lulav, but to ensure that people would not carry the lulav in the public domain (thus desecrating Shabbat), the Sages instituted that it be taken at home (Sukka 42b). Those who lived outside of Eretz Yisrael did not take the lulav if the first day was on Shabbat, because they did not know with certainty when the month had been sanctified by the beit din. Due to the resulting uncertainty about when the festival begins, they observed two consecutive days of Yom Tov. The extra day is called Yom Tov Sheni shel Galuyot. Since the people did not know for certain that the first day was indeed on Shabbat, the Sages ordained that outside of Eretz Yisrael, the lulav should not be taken at all on Shabbat, not even in the home, lest people mistakenly violate Shabbat by carrying the lulav in a public domain (Sukka 43a). However, because Diaspora Jews observed a second day of Yom Tov, even if one day coincided with Shabbat, they would take the lulav on the other day, and in years when neither day of Yom Tov coincided with Shabbat, Diaspora Jews would take the lulav on both days.
After the destruction of the Temple, the Sages ordained that throughout the world, the lulav should be taken on all seven days of the festival (except on Shabbat), to commemorate the Temple. They also instituted that even in Eretz Yisrael, when the first day is on Shabbat, the lulav is not taken, so that all Israel is uniform in its practice (Sukka 44a). Later, when the calendar was fixed and there was no longer uncertainty about when the first day was, the prohibition of taking the lulav on the first day of the festival when it fell on Shabbat remained in force (MT, Laws of Shofar, Sukka, and Lulav 7:16-18).
Perhaps we can suggest the reasoning behind this ruling. After the destruction, the spiritual impact of the mitzva of lulav was diminished, so it was necessary to reinforce it by having everyone, everywhere take the lulav all seven days. On the other hand, the Sages were very concerned about impinging on the sanctity of Shabbat, for after the destruction, Shabbat remained as the foundation of the vitality and blessing of continued Jewish existence; on Shabbat, we can say, the sanctity of the day accomplished what taking the lulav accomplished on the other days. So to ensure that no one desecrate Shabbat (God forbid), the Sages decreed that on Shabbat, even when it coincides with Yom Tov, the lulav is not taken. In practice, this means that when the first day of Sukkot is on Shabbat, we do not fulfill the Torah commandment of taking the lulav, as taking the lulav during the rest of the festival is rabbinic.