When a recipe calls for "an onion" it can be confusing knowing exactly which onion to use – after all there's more than one variety.
According to Care2, cooking with the right onion can add intense depth to the flavour of a dish, so getting it right can make a big difference:
Red onions work best for salads, sandwiches, pickles and salsas.
Red onions are generally milder in the summer months and have a gentler taste than yellow and white varieties. If you find they are too strong in flavour when raw, try soaking the onions in water for 30 minutes before using.
Yellow onions are best for dishes cooked over low heat for a long period of time such as soups and casseroles. They are also good for sautéing too.
Yellow onions tend to be cheaper than red onions but have a stronger flavour and more pungent smell. You will often find yourself tearing up when chopping into a yellow onion.