Although not the problem they're generally made out to be tomatoes are one of the vegetables that do have an influence on a wine pairing. Being quite acidic, especially when dressed with a vinaigrette, you want a wine that has a good level of acid too - and not too much, if any, oak.
I find it easiest to think in terms of uncooked and cooked tomatoes when deciding on a wine match:
Tomato salads, fresh tomato sauces and salsas and soups like gazpacho work well with crisp dry whites and dry rosés. With a classic French tomato salad I’d go for a Picpoul de Pinet or a dry southern French rosé, especially Provençal rosé. A light style of Sauvignon Blanc or a Côtes de Gascogne or Côtes de Duras works well too. With panzanella (Italian-style tomato and bread salad) you might want to go for a crisp Italian white like a Verdicchio
With pasta with a fresh tomato sauce like this one with prawns I’d go for an Italian white such as Pinot Grigio. Albarino is a good match with gazpacho.
With more intensely flavoured cooked dishes made with tinned, roast or dried tomatoes - especially if combined with grilled vegetables like aubergines or meat as in a lasagne - I think reds tend to work better, especially Italian reds such as Barbera d’Asti, Chianti, Montepulciano d’Abruzzo and simple Sicilian reds. Other Sangiovese-based reds are good too.
Stuffed tomatoes are good with lighter southern French reds such as Côtes du Rhône Villages or Côtes du Roussillon.
You may of course be looking to match lighter cooked tomato dishes such as courgette and tomato gratins or tomato tarts. These can take almost any kind of dry Mediterranean whites, light reds or rosés - like uncooked tomato dishes. Tomato fritters (a speciality from Santorini) are fantastic with the local Assyrtiko.
What I wouldn’t pair with tomatoes are big tannic reds, classic reds like Bordeaux or oaky Chardonnays except, in the case of Chardonnay, with a tomato tatin that has acquired an edge of sweetness.