An Onion comes in three grades, 1 to 3 stars. Herm sells plain Onions (25) and Onion seeds from his second tier. You can eat one raw for 5, 6 or 7 energy, but its first real use is the Vegetable salad: 2 Onions of any grade, 2 Carrots and 2 Beets make the dish that raises your Anatomy mastery.
Herm also pays happiness for them, more for better grades: 15 plain Onions count as 1 happiness (up to 30 a week), 10 two-star ones (up to 20) and 5 three-star ones (up to 10).
Onion beds lose seeds at first. Planting plain onion seeds needs Farming 10, and an onion bed’s growing steps succeed only 1 time in 5 (the garden’s growing skill starts at 2, against 10). Even after Garden Upgrade I raises it to 4, a bed returns fewer seeds than you plant. How beds grow is explained on the Carrot page.
Better onions help the salad. Each 2- or 3-star Onion counts as steps already done, which makes a 3-star salad easier.