The Bible gives us direct and clear guidance about selecting friends.
For example, in 1 Corinthians 5:11 Paul wrote: "I am writing you that you must not associate with anyone who calls himself a brother or sister but is sexually immoral or greedy, an idolater, or a slanderer, a drunkard or a swindler. Do not even eat with such people." Now, that's pretty strong guidance about relationships, wouldn't you agree.
Quite a few years ago I had a wonderful group of women meeting in my home weekly for Bible study and prayer, and we considered ourselves accountable to each other. At one point a new person started attending, and we were glad to have her. But she finally told us that she was living with a man to whom she was not married. We gave her strong biblical advice to immediately break that relationship off, but she was not willing to do that.
Over a few week's time I noticed that her presence in our group was affecting our fellowship and our ability to pray like before. Finally one morning God clearly directed me, through this passage in 1 Corinthians 5:11, to ask her to drop out of our Bible study until she was willing to obey Scripture.
I met with her privately, and as gently and lovingly as possible, explained from God's Word why she could no longer be a part of our group. She accepted it well, though she still refused to obey the Lord. That certainly wasn't pleasant, but it was the right thing to do. Since we weren't able to influence her to do the right thing, the only alternative was to keep her from doing harm to our group. We still remained friends with her, but we could not continue that kind of fellowship.
Is there someone in your life that is living immorally? Or someone who is greedy or dishonest? Maybe someone who slanders and gossips a lot, or is a drunkard? If you continue to associate with that person without pointing out the error, he or she will take that as approval on your part and the sin will not seem to that person so sinful. And you'll notice that your continued close association with them will start to affect your attitude toward sin and will drag you down spiritually.
Remember what James wrote: "Friendship with the world is hatred toward God. Therefore, anyone who chooses to be a friend of the world becomes an enemy of God" (James 4:4). Don't let the enemy defeat you through wrong relationships.