Question: Someone pointed out that there is some kind of contradiction in the Qur’an by saying that Allah praises the Christians and the Jews in one place and in another asks Muslims not to make friends (allies) among them as they are allies of each other (Surat al Ma’idah verse 51).
Answer: There is no conflict between the verses which you mentioned.
The Quran's verses which praise the Jews and Christians reflect the attitude which Muslims should generally have towards the other communities.
The verses which speak of not taking allies address specifically a war situation when Muslims had to secure their community from being attacked (for example in the Battle of the Allies, otherwise known as Al-Ahzab). In that situation, Muslims had to be careful to not expose their military secrets to the allied forces. And in those days, there was no clear separation between civilian and military. Every able-bodied person had to rise in defense of the community, and may thus be privy to the defense strategies of the prophet (pbuh). If such strategies were leaked out, the allies could gain an unfair advantage over the prophet and his lines of defense. Thus, it was a matter of precaution that Muslims do not take friends with anyone from the allied opposition at that crucial time. It's similar to modern military rules that would prevent soldiers from being drinking buddies with soldiers of the enemy troops.
However, in our present situation, we (as an ummah) are not at war with other forces. If countries are fighting against each other, their soldiers will naturally observe their military rules of conduct. Civilians are not involved directly in war nowadays. This is good for everyone, Muslims and non-Muslims alike, for in our situation civilians are generally safe due to the principle of non-combatant immunity. This also means that civilians will not generally know their countries' military secrets, and therefore there is no danger in them being friends with people from the enemy country. In today's situation, we will easily have even close relatives in other countries, and God forbid that our country should be at war with theirs. But, naturally, if there is a war, we would not deny our relatives.
In short, there is no harm today in Muslims having Jewish and Christian friends. In fact, it would be odd if they did not have such friends. Seeing that the specific war situation is not our situation, what applies to us are the verses which speak respectfully of Jews and Christians. Muslims should treat these and other communities with respect, and live with them in peace and harmony. Whatever political differences that remain should be settled at the political negotiation table, and whatever theological differences that remain will be settled by God on the Day of Judgement. Meanwhile, we should hold meaningful dialogue about theological matters, emphasizing our similarities while also acknowledging our differences, in the hope that God will use our humble efforts to further guide those who seek him.