(Cross-posted at Jennifer's History and Stuff.)
Some superstitions may have lost their original meaning, but have become ingrained in cultural behavior. These behaviors are no longer tied to a superstitious belief; throwing rice is one of these behaviors that simply became part of the culture. Of course, now you are more likely to see bubbles, flower petals, or birdseed at a wedding in the United States, but most of us have pelted a bride and groom with rice at one time or another.
The earliest known reference to throwing grains at a wedding occurred when a baker’s wife tossed wheat at Henry VII for good luck in 1486, and it became a widespread practice in England soon thereafter. The switch to rice took place around 1870, probably because rice was cheaper than wheat at the time.
Why throw anything? The Victorians liked to say it was to ensure fertility, but it was generally just to wish the new couple lots of luck, happiness, and prosperity. Using foodstuffs as good luck charms is not confined to weddings. We'll discuss salt and garlic another time.
Reference: Most of the material from this post was found in Steve Roud's The Penguin guide to the superstitions of Britain and Ireland.