For greenhouse growing, plant in pots or deep flats and allow them to come up closely together. When the tops reach 6 or 8 inches, cut back down to 3 inches and allow to grow back again. After the tops attain 6 or 8 inches again, cut back down to 3 inches again. What this does (besides providing you with an ongoing source of delicious green onion tops to eat) is it expands the bulbs and thickens the stems, so that when you go to transplant to the garden, transplant is easy and not finicky. A big advantage and a big onion!
For direct-seeding, we like to plant them closely together in the furrow and eat the thinnings on an ongoing basis, leaving the largest plants to mature at about 4 inches apart in the row, and dry and preserve those ones on into the winter, for those steamy soups that bolster us through the cold months. Onions prefer a full sun position, frequent watering, good garden soil, and assiduous weeding. A good crop of onions in a row out there differentiates the inspired gardener from the ho-hummer. Sow in spring.