Laws of Dwelling in a Sukkah

Obligation:
1. During all seven days of Sukkot (eight days outside of Israel), one's house should serve as his temporary dwelling and his Sukkah as his permanent dwelling. He should eat, drink, sleep and live in the Sukkah, day and night, just as he does the rest of the year in his house (Shulchan Aruch, Orach Chaim 639:1).
2. There is an obligation to sleep in the Sukkah, even for a nap. The law of sleeping in the Sukkah – for men – has a greater foundation in Halachah than does eating in the Sukkah. The basic halachah is that except for the first night (and the second night outside of Israel), there is no obligation to eat in the Sukkah unless one is eating foods made from flour such as bread, cakes or noodles. In contrast, there is an obligation to sleep in the Sukkah, even for a nap. Our Rabbi, Ha-Rav Tzvi Yehudah Ha-Cohain Kook, would remind his students of the importance of sleeping in the Sukkah. When he was in Switzerland in the cold and snow, he would not forgo even one night of sleeping in the Sukkah (Sefer Rabbenu - on the Life of Ha-Rav Zvi Yehudah Ha-Cohain Kook, p. 187).
3. Because of the great holiness of the Sukkah, it is proper to limit non-holy discussions and speak words of holiness and Torah in the Sukkah, and all the more so one must be cautious to refrain from speaking Lashon Ha-Ra (Mishnah Berurah ibid. #2).
4. At the beginning of the Laws of the Sukkah, the Bach explains that there are three Mitzvot which one does not fulfill in the proper manner if he does not elucidate the reason for performing them. They are: Tzitzit, Tefillin and Sukkah. During Sukkot, Maran Ha-Rav Kook would mention this idea and explain at the length the reason for dwelling in the Sukkah (Siddur Olat Re'eiyah vol. 1, p. 11 in the notes of our Rabbi, Ha-Rav Tzvi Yehudah). 

Eating in the Sukkah:
5. The order of Kiddush on the first night is: The blessing on the wine, the Kiddush, the blessing of "Leshev Ba-Sukkah" and Shehechiyanu. On the second night outside of Israel, Shehechiyanu is recited before the blessing of "Leshev Ba-Sukkah" since the Shehechiyanu applies to the holiday and not the fulfillment on the mitzvah of dwelling in the Sukkot which was performed the previous night for the first time (ibid. 661:1 and in the Rama and Mishnah Berurah #1). 
6. On the first night of the holiday (and the second night outside of Israel), one must eat an olive-size piece of bread in the Sukkah, just as one must eat an olive-size piece of Matzah on the first night of Pesach. And similar to eating Matzah, one should not eat on Erev Sukkot from noon onward in order to approach eating in the Sukkah with an appetite, one should not eat on the first night until it is definitely night-time and one should eat the bread before midnight (ibid. 639:3 and in the Rama).
7. It is forbidden to eat more than an egg-size piece of bread or foods made from flour such as cookies, cakes or noodles outside of the Sukkah. But if one eats meat, fruit or vegetables there is no obligation to eat in the Sukkah. One who glorifies the mitzvah to eat even snacks (not containing flour) in the Sukkah is praiseworthy (ibid. 2).

Those Exempt from Dwelling in the Sukkah:
8. Women and children are exempt from the Sukkah. A boy who reaches the age of education is obligated in the mitzvah of Sukkah so he can be educated about the Mitzvot (ibid. 640:1).
9. One who is distressed is exempt from the Sukkah whether he is sick, too cold or too hot, bothered by the wind, flies, bees or mosquitoes, etc. as long as the Sukkah was not constructed in a place where there would certainly be a hardship. Therefore, if it is raining to the extent that the rain would spoil a cooked dish – even if you do not currently have such a dish there – one may go into his house. This applies to all days of Sukkot, but on the first night (and on the second night outside of Israel) one is required to eat an olive-size piece of bread in the Sukkah even if it is raining (ibid. 639:5 and in the Rama). If it is raining on the first night (and on the second night outside of Israel), some authorities say that it is proper to wait until midnight to see if the rain will cease. Others explain that one should wait an hour or two in order not to impinge on the joy of the holiday (Mishnah Berurah ibid, #35). If the rain does not stop, one should recite Kiddush, eat an olive-size piece of bread in the Sukkah without the blessing of "Leshev Ba-Sukkah" and eat in his house. If the rain stops during the meal, he should go out to the Sukkah and finish it there (Shulchan Aruch and Rama ibid. and Mishnah Berurah #36).
During the remaining days of Sukkot, if one is eating in the Sukkah, and it begins raining so that he goes inside his house to eat, he may remain inside until the end of the meal, even if it stops raining (ibid. 6). If one is sleeping in the Sukkah, he need not wait until the extent that the rain would spoil a cooked dish in order to go inside his house since even a little rain is distressing when sleeping (ibid. 7 in the Rama). If he went to sleep at night in the house due to rain, he may remain in the house until the morning (ibid. 7).
10. It is permissible to take trips on Chol Ha-Moed Sukkot, and to sleep and eat outside the Sukkah, if a Sukkah cannot be easily found. One who is strict not to lose out on the mitzvah of Sukkah even once is praiseworthy (Shut She'eilat Shlomo 1:238 and 2:149).

Prayers in the Sukkah:
11. There is a custom to welcome in each night one of the seven spiritual guests called "Ushpizin." According to Ashkenazic tradition, the order of the Ushpizin is: Avraham, Yitzchak, Yaakov, Yosef, Moshe, Aharon and David. According to Nusach Sefard, the order is: Avraham, Yitzchak, Yaakov, Moshe, Aharon, Yosef and David.

12. When departing from the Sukkah at the end of Sukkot, some say: May we merit to dwell in the Sukkah of the Leviathan" (ibid. 667:1 in the Rama). And the Aderet – Ha-Gaon Ha-Rav Eliyahu David Rabinowitz Te'omim – the Rav of Jerusalem and Maran Ha-Rav Kook's father-in-law, would say: May we also merit in the coming year, may it be good for us, to fulfill the mitzvot of Sukkah and the Four Species, the rejoicing on Holiday and all of its parts according their proper halachic prescriptions, and fulfill all of the Mitzvot from now until next year, may it be good to us and all Israel, amen (Tefillat David, p. 110 and Nefesh David, p. 197, 211).