Sometimes recipes call for onions without specifying which kind. An article in the Helena Independent Record explains the different kinds of onions and how they can best be used.
About yellow onions, the article says:
Yellow storage onions. Common cooking onion, sold in red net bags, is hot and makes you cry. This workhorse is good in any heated dish or one where subtlety is not an issue.
About red onions, it says:
Sharp, sweet flavor. Uncooked, these can be added to any salad. When cooked, they lose some of their flavor and turn a greenish hue. Sold individually.