There has been different magical occurring in different yuga's as far back as the Goddess of Lakshmi's Birthday which was on the new moon day[Karthik]. Chronologically that may be the starting point,she was welcomed by the lights or it may be told to have removed the darkness for ever, ushering in the era of knowledge which itself is the lights.
Second occasion is much later during Ramayan,when Sriram along with Sita and Lakshmanan came back to Ayodhya after killing Ravan who had kidnapped Sita.So the people welcomed them back with lights all over with joy and pride, as the time by then has been 14 years since Rama was sent on an exile to the forests by his father on the very day slotted for his Crowning ceremony, which was opposed by Queen Kykai , his step mother, who wanted the kingdom to be given to her son Bharath.
Then came the Dwapara Yuga during which two happenings took place,one was the return of Pandavas' after their exile forced by Kauravas, from the forests, the people rejoiced and welcomed them with lights, the second was the killing of Narakasura a demon, who was killed by Sri Krishna on the same day.
So, as one can see, there are a lot of good happenings on Deewali/Deepawali day hence,the celebration throughout India as we still believes that good happenings will come yet again on this most auspicious day,when the good will prevail over bad in other words the light of knowledge will remove the darkness of ignorance and insanity.
There is a saying in Tamil "Arive than Dievam" which means the absolute knowledge itself is god.