There are certain places, such as New York, where it commonly rains during the holiday of Sukkot. Even in Israel it has happened in the past that rain has fallen during Sukkot.
In the Land of Israel, rain during the Sukkot holiday is an ominous sign, as our Sages taught that this is comparable to a servant who pours a beverage for his master and the master throws the cup in the servant’s face. So too, when it rains on Sukkot and everyone leaves the Sukkah, it is a sign that Hashem does not want us to be sitting in the Sukkah.
Nevertheless, we must discuss how one should behave when it rains in the Sukkah. If one was sitting and eating in the Sukkah and it suddenly begins to rain strongly (to the extent that if a plate of food was before him, the food would get ruined, see Rashi’s commentary on Sukkah 29a), one should exit the Sukkah and return home and continue one’s meal there. Although there might not be an actual plate of food on the table getting ruined, for instance, if one is eating cake and they do not get ruined from such rain, nevertheless, one still need not remain in the Sukkah in this case and one should return home (See Shulchan Aruch Chapter 639, Section 5).
If during one’s meal at home, the rain stops, there is no obligation to continue one’s meal in the Sukkah and doing so is merely a stringency (see Yabia Omer Volume 9, Chapter 63). The above applies on any other day of the Sukkot holiday. However, on the first night of Sukkot, one is obligated to return to the Sukkah and eat a Kezayit of bread there as soon as the rain stops.
Similarly, if one begins to eat at home because he sees that it is raining and then he realizes that the rain has stopped, he need not go out to the Sukkah in order to finish his meal; rather, one may conclude one’s meal at home. This law does not only apply to rain, rather, if one was sitting in the Sukkah and strong winds start gusting suddenly and pieces of the Sechach start falling into the Sukkah and it makes it difficult to remain in the Sukkah, one may finish one’s meal at home (see Sukkah 29a).
If it is raining outside but the Sechach on one’s Sukkah is so thick that the rain does not penetrate the Sukkah, one must eat in the Sukkah and even recite the blessing of “Leeshev Ba’Sukkah.” (Chazon Ovadia- Sukkot, page 185 quoting the Bikurei Yaakov)
If one is exempt from the Mitzvah of Sukkah because of rain and the like and nevertheless acts stringently and eats in the Sukkah anyway is considered a fool and does not receive reward for this (see Rama in Chapter 639). If one recites the “Leeshev Ba’Sukkah” blessing in such a case, this blessing will have been in vain.
If one must leave the Sukkah as a result of rain and the like, one should not kick it on one’s way out; rather, one should leave in a subjugated manner similar to a servant that had a beverage thrown in his face by his master in that he must act in a subjugated manner and not with anger and the like.