Historical one relates to the Thrikkakara Temple and a kingdom (Perumal kingdom) ruled the then Kerala. Mythological one relates to the Asura Kiing Mahabali and the Vishnu's Vamana reincarnation. Agricultural reason is simply that the Onam days are just after the harvest season. People celebrate when they get good harvest.
Gold Member, SPK
Ramanathan A R