The ideal time to plant onions in Kenya is during the long rains, which typically occur between March and April. This period provides the necessary moisture for onion establishment. Alternatively, onions can also be planted during the short rains, around September to October. It's important to align your planting schedule with the local climate patterns.