There really is no "code" per say, but winetasting is a sorta classy event, so dress a little on the classier side, IMO. Whatever you wear, avoid heels. Good chance you may be walking over grassy and sandy areas and your heels will get damaged from all that grinding into the dirt. Think ballet flats or neat thong sandals. Something comfy in case the tasting may involve a walkthrough or tour of the vineyard where the wine is made.
If the weather is nice, you may want to wear a pretty sundress, something light yet comfy to move in. If not, I have worn jeans, maybe dressed up a little more than mommy-in-the-park wear, like maybe a blazer or something breezy and light on top.
I would perhaps also think twice about anything that may fly up (short skirt) or, like, say, your hair you may want a little pinned back, since I recall spending more time outdoors that I thought I would when I went winetasting.
On the other hand, it is easy to look too dressed down for it. I went with a crew once and one woman had on super-short shorts, that sweatpants material, and a spaghetti strap top with plastic flip flops. She looked like a college chick going off the the local laundrymat -- too dressed down. She stood out in a bad way.