So, this happened again (refer http://blog.123iitjee.com/2007/07/when-doorbell-rings-4-am.html) with another doorbell at another place in rainy season. This happened during the period when there was no electricity board supply and the backup power was provided by UPS. The doorbell (the ding-dong wired one type) rang with the usual sound coupled with some distortion. This is a two-storey house and I was in the upper floor when this happened. To check the reason, I got down the stairs and before I needed to go out to check closely if anybody was there I could hear the sound of the running refrigerator kept at the ground floor. Since refrigerator in not connected to the UPS supply, this meant that the electricity board power had come. Now, since the doorbell rang at an odd time when nobody was expected and the security guards generally appear to be vigilant and the incident most likely coincided with the electricity board's supply coming back, the reason for ringing could be figured out without needing to go outside. As the electricity board power came back, the power load shifted from the UPS supply to the electricity board's supply. This could have caused power surge and would have set the doorbell ringing. Power surge, i.e. increase in voltage for short duration can be caused when there is lightning or when the mains power comes back besides other reasons. The distortion noticed in the sound further supports this possibility. Incidentally, the advice to remove the plug from the socket during thunderstorm and lightning is given due to this reason as power surge can make the switch electrically close even if it is mechanically open and can potentially damage an equipment.