When the people closest to you do not share your faith
The Qur'an makes room for friendship across religion, and it says so directly: "God does not forbid you from being kind and just toward those who have not fought you over religion". What it names as the condition is conduct — how a person has behaved toward you and the people you belong to. Someone who has made no war on you and has driven no one from their home is someone you are told to treat well, and the verse closes by saying God loves those who act justly.
The verse immediately after it draws a line, and the line sits at hostility: alliance with those who fought you over your way of life, drove you from your homes, and backed others in doing it. Both verses reached a community that had been run out of Mecca and was still at war with the people who did it. Reading the second one as a general rule about neighbours, classmates and colleagues asks it to carry weight it was never given.
Difference between peoples is described as arranged rather than merely tolerated. Humanity was made into peoples and tribes "so that you might come to know one another", and that knowing is ordinary work: sitting with someone, eating at their table, hearing how they arrived at what they think. Friendship is one of the few places where it happens at all.
The manners asked for hold even where the disagreement is real. Believers are told to stand as witnesses to justice and "do not let hatred of a people drive you to be unjust", to reason with the People of the Book in the way that is best, and to leave other people's sacred things unmocked. One community is singled out for closeness in affection, and the reason given is what its people are like to be around: "among them are priests and monks, and because they are not arrogant".
Whether a particular friendship is good for you is a separate question, and a page of verses is the wrong place to settle it; someone who knows your life is the right one. Where to start is settled here — with kindness and justice toward people who mean you no harm, and with the possibility the Qur'an holds open that God may put affection between people who count each other enemies today. On what friendship is for, see Quran verses about friendship, and on the daily practice of it, Quran verses about kindness.
60:8 — God does not forbid you from being kind and just toward those who have not fought you over religion and have not driven you from your homes. Indeed, God loves those who act justly.
60:9 — God only forbids you to take as allies those who fought you over your way of life, drove you from your homes, and supported others in driving you out. Whoever takes them as allies — those are the wrongdoers.
49:13 — O humankind, we created you from a male and a female, and made you into peoples and tribes so that you might come to know one another. The most honored of you in God's sight is the most mindful of him. God is all-knowing, all-aware.
5:8 — You who believe, stand firm for God as witnesses to justice, and do not let hatred of a people drive you to be unjust. Be just — that is closer to mindfulness of God. And be mindful of God; God is fully aware of what you do.
5:82 — You will surely find the most hostile of people toward those who believe to be the Jews and those who ascribe partners to God; and you will surely find the closest in affection to those who believe to be those who say, "We are Christians." That is because among them are priests and monks, and because they are not arrogant.
29:46 — Do not argue with the People of the Book except in the best way — apart from those among them who do wrong — and say, "We believe in what was sent down to us and what was sent down to you; our God and your God are one, and to him we have surrendered."
6:108 — Do not revile those they call upon besides God, or they will revile God out of hostility, without knowledge. In this way we have made every community's deeds seem pleasing to them. Then to their Lord is their return, and he will inform them of what they were doing.
4:36 — Worship God and associate nothing with him. Be good to parents, to relatives, to orphans, to the needy, to the neighbor who is kin and the neighbor who is a stranger, to the companion at your side, to the traveler, and to those whom your right hands rightfully hold. God does not love the arrogant and boastful.
60:7 — It may be that God will bring about affection between you and those of them you now hold as enemies. God is All-Powerful, and God is Most Forgiving, Most Merciful.
2:256 — There is no compulsion in the way of life. Right guidance stands clear from error. Whoever rejects false power and believes in God has grasped the firmest handhold, one that will never break. And God is all-hearing, all-knowing.