We grew onions this year, and here is what I learned - with thanks to garden.org's Learning Library:
Onions can be picked and eaten at any stage.
When onions stop growing, the leaves lose their green color and flop over, putting the last of their energy into the bulbs.
Leave the bulbs in the ground another 10 days after the flop, to mature fully. Not longer than 2 weeks, to avoid rotting.
Harvest them on a sunny day; you don't want them to be too wet.
Let them sit in the sun after you pull them out to kill the roots.