I believe God is pretty clear when He tells Christians to not align themselves with worldly people. That doesn't mean we treat them badly or talk bad about them, and it certainly doesn't mean we should think more highly of ourselves than we ought. It also doesn't mean we shouldn't talk to them cordially or work around them on our jobs. It simply means God gives us instructions in His numerous warnings for our protection, that we don't somehow wind up living our old lives again because of bad influences. We are called to live differently.
The principal goes way back to OT times when God told His people (paraphrased) --Therefore, come out from among unbelievers, and separate yourselves from them, says the LORD. Don’t touch their filthy things, and I will welcome you.--. Paul in 2 Cor 6:14-17 is quoting Isaiah 52:11 and Ezekiel 20:14 as he impresses on the church in Corinth that the principal is good for their time too. Among other things, Paul says "what do righteousness and wickedness have in common? Surely that question is pertinent in our time 2000 years later?
We are cautioned in 1 Cor 15:33 to not be fooled, or seduced or thrown off course when Paul says, "Bad company corrupts good character". The obvious solution is not to keep company with bad people. False teachers are the topic in 2 John 1:10, when John says if anyone does not bring the true Gospel, that Christians should "not take them into your house or welcome them".
We have warnings about people who claim to be Christians, yet live in obviously sinful worldly ways. 1 Cor 5:11 says, ..."you must not associate" with people who are sexually immoral, greedy, idolaters, slanderers, drunkards or swindlers. "Do not even eat with such people" scripture says.
Divisive people, those who cause dissention, division, and keep hostility stirred up, are also people we should avoid. Scripture says in Titus 3:10-11, "...have nothing to do with them".
We need to note in all of these that we aren't told to be careful while we are running in their group, or to keep our guard up as we frequently associate with them. We are told to avoid them, don't eat with them, don't welcome them into our homes. Why, because they will influence us, like it or not, and too much of that influence can cause permanent damage and could cost us our salvation.
Paul, writing to Timothy warns him too. (2 Tim 3:1-5) We all know the scripture, “But mark this: There will be terrible times in the last days. People will be lovers of themselves, lovers of money, boastful, proud, abusive, disobedient to their parents, ungrateful, unholy, without love, unforgiving, slanderous, without self-control, brutal, not lovers of the good, treacherous, rash, conceited, lovers of pleasure rather than lovers of God— having a form of godliness but denying its power. Have nothing to do with such people.” These descriptions of people very much identify many in our world today. When we are aware of people who live like this, our warning too is "have nothing to do with such people."
These warnings in scripture certainly aren't politically correct, and some might think we are bigots when we apply God's word to our lives in this way. But the warnings are there from our God who knows all, and they are for our safety and our spiritual health. We need to heed them, trying not to offend in the process. We are not necessarily better than anyone, but we are called to be different. We are still to have contact with the lost, loving them and try to bring them to salvation, but we have the necessity to protect our own souls in the process.
Our job is to guard ourselves so that our Christ like influence is to the benefit of non believers, and in doing so, assure that bad people don't have opportunity to influence us out of our commitment to Christ.