Here is the story from Wiki:
In Sicily, where St. Joseph is regarded by many as their Patron saint, and in many Italian-American communities, thanks are given to St. Joseph ("San Giuseppe" in Italian) for preventing a famine in Sicily during the Middle Ages. According to legend, there was a severe drought at the time, and the people prayed for their patron saint to bring them rain. They promised that if he answered their prayers, they would prepare a large feast to honor him. The rain did come, and the people of Sicily prepared a large banquet for their patron saint. The fava bean was the crop which saved the population from starvation and is a traditional part of St. Joseph's Day altars and traditions. Giving food to the needy is a St. Joseph's Day custom. In some communities it is traditional to wear red clothing and eat a Neapolitan pastry known as azeppola (created in 1840 by Don Pasquale Pinatauro in Napoli) on St. Joseph's Day. Maccu di San Giuseppe is a traditional Sicilian dish that consists of various ingredients and maccu that is prepared on this day. Maccu is a foodstuff and soup that dates to ancient times which is prepared with fava beans as a primary ingredient.
Upon a typical St. Joseph's Day altar, people place flowers, limes, candles, wine, fava beans, specially prepared cakes, breads, and cookies (as well as other meatless dishes), and zeppole. Foods are traditionally served containing bread crumbs to represent saw dust since St. Joseph was a carpenter. Because the feast occurs during Lent, traditionally no meat was allowed on the celebration table. The altar usually has three tiers, to represent the trinity.
My friend wishes me to be prosperous and the fava-bean prayer is said so that one never goes
without food or pennies in the pocket. Now, I must admit I passed on the fava beans to someone who
is much more needy than I am....May St. Joseph bless both of us, keep us in food, and if in
God's Will, bring us prosperity.