A little rain won't hurt your bike - but you do need to dry it well when you get home and relube the chain, otherwise any remaining water will make it rust.
The grit that is on the roads mixed with water can make a kind of nasty slurry that wears some components and your rims faster than if you always ride when its dry, but your likely to only notice that if you ride in the rain a lot. Out here in the rainly PNW those of us who ride through the winter often have a "rain bike" with cheaper, sturdier components on it just because of this. You can cut down on the wear and tear by being sure to rinse your bike (gentle running water - no power washing! you'll just drive water and grit into areas that it shouldn't go) and dry it thoroughly each time you ride in the rain. Check (and likely change) your brake pads often if you have been riding a lot in the rain too. Make sure there isn't any embedded grit in there to hurt your rims.

