Yes it does matter, but there's no need to be overly strict.
Each type of wine features different characteristics such as acidity, tannin, alcohol level and sweetness.
The reason you should properly pair the wine and food is because the tannin in the wine and the oils of the food can cancel each other out. Basically, an incorrect pairing can bring all the negatives of the food and wine to the forefront in your mouth leaving you with a mouthful of food you can't really taste, or worst still, a mouthful of wine that you can't taste!
Bold reds such as Cabernet Sauvignon and Syrah/Shiraz deserve to be paired with a hearty meal whereas lighter wines such as Chianti and Barbara d'Asti have more subtle flavours and work well with a less hearty meal.
Spicy meals need a fruity red wine such as Barbera, a well rounded Montepulciano, or a fruity white such as Soave. But a sparkling Prosecco or a lightly sparkling Moscato will go exceptionally well with spicy foods.
Crisp white wines such as Pinot Grigio are especially good with lunch or an afternoon with cheese and crackers and Chardonnay's work really well with seafood.
As a rule of thumb, stick with whites for light meals or white meats such as fish and chicken, and stick with reds for red meats.
However, there are some exceptions!
- Bubbly wines such as Prosecco and Champagne have a faint touch of fruity sweetness and combined with their bubbles will actually cleanse the pallet of oils and spices. Which is why a bubbly white wine goes well with most spicy foods, finger foods, fried foods and appetisers at a party.
- Also, a small amount of tasty or vintage cheese cleanses the pallet and sets up your mouth to really enjoy any red wine. This tip is highly recommended if you're opening a bottle during the afternoon or without a meal!
Definitely avoid sweet wines before or with a heavy meal. Sweet's are best served with something light and especially good after any meal to enjoy as a dessert or with a special brunch.