taken from japan-guide.com
Setsubun ("seasonal division") is a festival that is held on February 3, one day before spring starts according to the Japanese lunar calendar. Setsubun is not a national holiday.
A rite of chasing away evil spirits (oniyarai or tsuina) by bow and arrow was performed around the beginning of spring as early as the 8th century. In the 13th century a custom developed according to which the demons were driven away by the strong smell of burning dried sardine heads, the smoke of burning wood and the noise of drums. This custom is not popular anymore, but a few Japanese households still hang fish heads and holy tree leaves over their houses' entrance on Setsubun so that evil spirits do not enter.
Nowadays, it is popular to shout "Oni wa soto, Fuku wa uchi" ("Oni outside, good luck inside") when performing the bean throwing rite described below. Since the Edo period (1603-1867), the rite of throwing around roasted beans inside one's house is performed on Setsubun. Beans are believed to be effective against evil spirits, oni in particular. Throwing them around in one's house will protect the house and family from misfortune. Afterwards, everybody is supposed to pick up and eat the number of beans that corresponds to one's age. As all traditional festivals, Setsubun is celebrated in many variations throughout the country.
Relevance to Urusei Yatsura
The idea of Setsubun is a big part of Lum and Benten's relationship and referred to often during the series. In the Japanese view of Setsubun, it's a day when the 7 Lucky Gods (or Shichi fukujin) side with the people so that they may rid themselves of bad luck (embodied by oni).
Lum represents the Oni and Benten represents the 7 Lucky Gods. Even though they're friends, whenever Setsubun comes around, they become bitter rivals and engage in fierce wargames in the spirit of the holiday. This is a rivalry that has gone on between both their peoples for centuries and continues to take place every year. Often the Setsubun fights between Lum and Benten resemble paintball, only with Benten using a bean-shooting gun instead while Lum uses a mixed arsenal.
The contemporary Japanese view of Setsubun is as a quaint superstitious little tradition. What makes it funny in UY is that that same holiday has been twisted around as a high-stakes battle of the planets.