The onion rots from the inside out.
The green thingy is the shoot - so you could, theoretically, plant it and have baby onions in about 3 months!
Once the onions have a green shoot, they begin to turn soft and sort of sickly. MUCH better to have a nice, crisp, fresh, white (or red!) onion...