"Know ye not that the friendship of the world is enmity with God? whosoever therefore will be a friend of the world is the enemy of God." (James 4:4)
The phrase "a man is known by the company he keeps" has been used in English-speaking countries since the 1500s.
Not only is the saying biblically based, but it is easily observable in everyday life.
Friends Shape Friends: "Iron sharpeneth iron; so a man sharpeneth the countenance of his friend" (Proverbs 27:17). In our text above, James notes that the world's friendship so contrasts with the heart and mind of God that such a friendship turns our relationship with God into enmity. The apostle John gives the clear reason: "For all that is in the world, the lust of the flesh, and the lust of the eyes, and the pride of life, is not of the Father, but is of the world" (1 John 2:16).
Friends Love Each Other: "Ye are my friends, if ye do whatsoever I command you…. I have called you friends; for all things that I have heard of my Father I have made known unto you…. These things I command you, that ye love one another" (John 15:14-17). This is pretty simple. If I love the Lord Jesus, and you love the Lord Jesus, then we will love each other—because we have a common friend!
Friends Stick Together: Because of our common love for the Lord Jesus, we do not forsake "the assembling of ourselves together" (Hebrews 10:25). Neither do we follow the "counsel of the ungodly," or hang around "in the way of sinners," or feel at home with "the scornful" (Psalm 1:1), because there is no fellowship in "righteousness with unrighteousness" (2 Corinthians 6:14).
Godly people will have godly friends. HMM III