Anas ibn Mālik (may Allah be pleased with him) explains that when the Prophet (may Allah's peace and blessings be upon him) entered Madīnah as an immigrant from Makkah, everything in Madīnah started shining with light. When he died, everything started getting dark therein. The light and darkness are metaphorical. When the Companions were done burying the Prophet (may Allah's peace and blessings be upon him) they did not find their hearts in the same state which they had experienced during the Prophet's life. The light, compassion, and amicability receded because the divine revelation had stopped, and they were no longer blessed with the Prophet's Companionship.