I make basic tomato sauces on a regular basis, mostly for pasta and pizza. In fact, I made one just over an hour ago, so I thought I'd explain how to turn a very few ingredients, that most people probably have in their cupboards, into something that tastes wonderful (and which costs a whole lot less than store-bought sauces).
Onion, finely chopped
Olive oil (extra virgin offers the most complex flavour, but virgin or light will do)
Wine vinegar/Balsamic vinegar
Red chilli - fresh, dried, whole or flaked, or Tabasco
Red/orange or yellow pepper, chopped quite fine.
Heat the oil in a pan. Add the onion, cook until slightly softened. Add the garlic and chilli, if using, fry another minute or two. Add the tomatoes, and peppers if using. Season with salt and black pepper, a pinch of sugar and a dash of vinegar. Stir, and taste - adjust the last four ingredients to taste. Cook on a low heat until everything is breaking up and the sauce is thickened. Add water if it gets too dry. Blitz in a food processor/blender if you want a smooth sauce.
*You can use fresh tomatoes of any size, if they are really ripe and full of flavour. Out of season, I would opt for tinned, either chopped of whole. A squirt of tomato purée adds extra intensity, and can make up for insipid fresh tomatoes (don't use too much though, as it can make the sauce taste too much like neat tomato purée). Passata is possible, but it tends to be more expensive.
**Great herbs to use are copious amounts of basil, generous quantities of oregano or sage, a couple of sprigs of thyme or one of rosemary, a small quantity of lovage (all fresh), or one or two bay leaves (fresh or dried). The basil after cooking but before puréeing (as basil loses its fragrance if cooked), the others would be added with the tomatoes.
Theory and Substitutions
The idea is to make a rich, balanced, and versatile sauce, without spending much money. The sugar and vinegar enhance the natural sweetness and acidity of the tomatoes, and the salt works with its savouriness - but you can leave it out if you are trying to avoid it. I find it best to use an unprocessed cane sugar, or a golden sugar, rather than white sugar, because the latter lacks complexity and tends not to integrate as well, but use whatever you have to hand. Note also, that bell peppers make the sauce sweeter, especially if you purée it. It may be better to make a big batch of plain sauce, and then add garlic, or chilli, or herbs, to each batch when using. It will keep in the fridge for a few days, and freezes well. If using for pizza, it is probably best to purée the sauce for ease of spreading.
I try to vary the recipe every time I make it, just to see what works. Today, for example, I used ajwain (a South Asian seed with the intense fragrance of thyme) instead of herbs, and Tasmanian mountain pepper instead of black pepper, as I'm trying to find uses for it. Paprika can be added in addition to or instead of chilli. Different colours of tomato can lead to wildly different coloured sauces (from pale gold to orange and purple). A cup of dry red or white wine can be added with the tomatoes, in which case be careful with the vinegar and sugar (they may not be necessary, depending on the wine).
Depending on the type of tomatoes you use, the cost per batch (say, 750ml finished sauce) can be as little as £1. If you grow your own, it will cost a few tens of pence. Either way, it's a great standby to have in your fridge or freezer - and making it in large batches should work out a bit cheaper.