Narrated Abu Huraira:
Allah's Apostle said, "The riding person should greet the walking one, and the walking one should greet the sitting one, and the small number of persons should greet the large number of persons." [Bukhari]
Another narration also adds, "The younger person should greet the older one."
This is just one small reason of many reasons why we call Islam the religion of peace. Rasulullah (saw) even taught us simple etiquette such as who should greet whom first.