Bags of raisins and/or almonds (but more likely, hard candies) are throw in synagogue when
(1) the groom (and in egalitarian circumstances, the bride) come up to the bimah (reading desk) to have an aliyah (read from the Torah) on the Sabbath before the wedding. The ceremony is called an "aufruf" from the Yiddish/German "aufrufen" to call up, or to be called up, since the groom (and bide) is called up to the Bimah. The raisins/almonds/candies symbolize fertility and/or wishes for a sweet life. They are promptly snatched up by children (and perhaps hungry adults).
(2) at a bar-mitzvah (a more recent tradition or revival), after the bar-mitzah boy (or bat-mitzvah girl, in the case of egalitarian synagogues) finishes reading the Haftarah on Saturday morning.
I remember spending one Shavuot evening session discussing the Halachah (rules) of food fights--what foods is it permissible to throw? It's a question that gets discussed in Talmud, believe it or not. The general conclusions: you can throw things which aren't gooey, and won't injure someone. Raisins and almonds would qualify, but I've usually seen hard candies or sourballs or wrapped chocolates (Kisses or Tootsie Rolls) used. Then again, in the old days...