Rawls says at least two important things about this topic.
First, he says that when we set up the rules about our society and about distribution of these kinds of resources, we need to do so from the "original position." That is we need to act as if we do not know where we be on the socioeconomic ladder in our society. That way, we would set up a system that would distribute resources in a way that was fair to all.
Second, Rawls says that once we have set up our society, we have to act according to the idea of "maximin." We have to act such that any inequalities in the distribution of social or economic resources have to work to the benefit of the least-advantaged members of society. It is okay if there is inequality of wealth, but that inequality has to be better for the poorest people than any other situation would be. In other words, the poorest people have to be better off under the system of inequality than they would be in a perfectly equal system.