Aarti's gesture, a lit flame circled before something sacred, is older than the devotional image worship it now usually serves. Vedic religion already treated fire as the visible presence of the divine, and the later shift of Hindu worship toward housed images, murtis treated as living guests, gave that older reverence for flame a new object: the lamp offered not to fire itself but to the god the fire now illuminates.
Temple manuals from the Puranic and Agamic periods, roughly the first millennium of the common era, formalized this into a full daily schedule rather than a single gesture, so major temples today perform several named aartis, a waking aarti at dawn, a midday one, an evening one, and a final one before the deity is put to rest, each with its own timing and sometimes its own hymn. Congregational aarti singing owes much to the later bhakti movement, whose poet saints composed devotional songs meant to be sung by a gathered crowd rather than recited by a lone priest, which is why aarti today is often the most participatory moment of a temple visit even for worshippers who take no other part in the ritual. The practice travelled with the Hindu diaspora largely unchanged in form, so a congregation circling a lamp and singing together looks much the same in a temple built decades ago as in one with a continuous history of many centuries.