While there's no such thing as a "Napa Valley dress code" (and no strict dress code for wine tasting in general), like any other activity you might make a reservation for, it doesn't hurt to check out the websites for the wineries you plan to visit to get a sense of the level of formality. You should also keep in mind the weather and any activities you may have signed up for. For example, a walking tour of wine cellars might warrant layers and comfortable shoes.
Some wineries encourage walk-ins, conduct tastings standing at the bar, and have zero expectations regarding your attire. For a casual winery, shorts and sandals may be perfectly acceptable in warmer months. On the flip side, some wineries are by reservation only, with formally hosted tastings (read: be on time), and might prefer you dress like you would for a restaurant reservation. Either way, if you need some inspiration for what to wear wine tasting, you can't go wrong with a flowy dress and some "wine country casual" accessories.