Al-Khidr was named so because he sat over a barren white land, it turned green with plantation after his sitting over it
Authentic hadithعن أبي هريرة رضي الله عنه عن النبي صلى الله عليه وسلم قال: «إنَّما سُمِّيَ الخَضِرُ أنَّه جلس على فَرْوَة بيضاء، فإذا هي تهتزُّ مِنْ خَلْفِه خَضْراء».
Abu Hurayrah (may Allah be pleased with him) reported that the Prophet (may Allah's peace and blessings be upon him) said: "Al-Khidr was named so because he sat over a barren white land, it turned green with plantation after his sitting over it."
Explanation
The Prophet (may Allah's peace and blessings be upon him) says that Al-Khidr got this name because once he sat on a barren piece of land that had no plantation, and it turned into a greenery. Al-Khidr is mentioned in the story of Mūsa in Sūrat al-Kahf. Scholars differed whether he was a prophet or a righteous ally of Allah. The sound opinion is that he is a prophet.
Source · Narrated by Bukhari
From the Hadith Encyclopedia (hadeethenc.com).