The time to harvest onions is when the tops go yellow and fold over.
Onions are best grown in sandy soils as too much organic matter can make them go soft. If this happens they won’t keep or store well.
Be careful when you pull them up that you don’t damage them. They won’t store well if this happens.