In Matthew 25:31-46, Jesus identifies himself with the hungry, the poor, the sick, and the prisoners. That passage is considered a major aspect of Christianity and is the cornerstone of Christian socialism. Another key statement in the New Testament that is an important component of Christian socialism is Luke 10:25-37 that follows the statement "You shall love your neighbor as yourself" with the question "And who is my neighbour?", and in the Parable of the Good Samaritan Jesus gives the revolutionary response that the neighbor includes anyone in need, even people we might be expected to shun.
Socialism owes more to the Bible than Marx.
Acts 4, verse 32:
"All the believers were one in heart and mind. No one claimed that any of his possessions were his own, but they shared everything they had."and Acts 4, verses 34 and 35:
"There were no needy persons among them. For from time to time those who owned lands or houses sold them, brought the money from their sales and put it at the apostles' feet, and it was distributed to anyone as he had need."John Chrysostom explained his attitude towards the rich and wealth by saying:
I am often reproached for continually attacking the rich. Yes, because the rich are continually attacking the poor. But those I attack are not the rich as such, only those who misuse their wealth. I point out constantly that those I accuse are not the rich, but the rapacious; wealth is one thing, covetousness another. Learn to distinguish.