Basically there are two aspects of saying greetings.
- You want to greet or wish someone ethically (as cultural practice where we live)
- You live in religious society where you greet the other person accordingly.
First, peace is the key element to prevail in a society. Ethically we usually need to wish or greet to different people, in order to have good relationships or sometime a kind of pre-gesture is good, before starting any business talk. Which makes discussion environment a friendly. This is a general understanding about greeting to someone.
Now how should you greet?
To have a good social relation we need to greet someone in his way, but being in our religious boundaries (because we can not do something which is prohibited in our religion).
In Islam, Allah has mentioned in Quran that when you see other Muslim you should say "salam or Asalam-o-Alaikum" which is an exact Arabic grammer. This in English means "peace be on to you". So what does this means in Islam?
This a kind of short wish we pray to Allah that: May Allah keep you in peace and safe.
Muslims always say their prayers and wishes to Allah so this is the whole concept and background.
In religion context the Islam is the most final and complete religion human follow or should follow, as other religions that people follow, have actually stopped learning and study of religion; hence they even did not read and put thought on last order/instructions sent from Allah for its mankind. So they are actually denying the last and final order from Allah (until they read and understand).
What are Muslims and today's extremism subject, does not relate to any religion. Its an individual deeds that he commits and follows for his own desires.
Let's make it short here as this answer should be precise and relevant only.
Muslims can not say " Salam" to non-muslims because the non-muslim is not accepting Allah's last order so he is no more following Allah. So in a cultural society we should greet other person accordingly, that he feels nice about.
Lastly, Allah is not our Servant or employee ( may Allah forgive me of using these words, but for others understanding) that he is bounded to do-what we wish him to do.
Allah says in Quran, I created this universe and life, so I can see who does the good deeds and do good practices among you. [Surah Mulk, Chapter 29]
I have tried to answer, being in possible right way. May Allah forgive us and show right path to us.