The problem as you have described it is somewhat underspecified. At least three pieces of information are required to make further progress:
- Do you want a social welfare function (SWF), or just a social welfare order (SWO)? Any SWF determines an SWO, but in general an SWO requires less information. (Many SWFs correspond to the same SWO, and some SWOs cannot be represented by a continuous SWF.)
- How is the preference order $\succeq_i$ of each individual represented by a utility function $u_i$? (Preference orders contain less information than utility functions. Many utility functions correspond to the same preference order, and some preference orders cannot be represented by a continuous utility function.)
- (most important) How do we make interpersonal comparisons between the well-being of different people?
A "minimalist" approach is to eschew the use of utility functions and make no assumptions about interpersonal comparisons. But Arrow's Impossibility Theorem (already mentioned by VARulle's answer) shows that this approach leads nowhere. One way to interpret Arrow's Impossibility Theorem is that it implies that some assumptions about interpersonal comparisons are necessary in order to obtain a satisfactory theory of social welfare.
One way to make progress is to make more specific assumptions about the nature of the alternatives and the structure of each agent's preferences over these alternatives. Here are two examples:
- Suppose that the social alternatives are lotteries over some underlying set of social outcomes, and the preferences of all the individuals and of the society over these lotteries satisfy the von Neumann-Morgenstern (vNM) axioms. Then the preferences of each agent can be represented as maximizing the expected value of a utility function. In this case, Harsanyi's Social Aggregation Theorem says that, if social preferences satisfy a Pareto axiom, then the social vNM utility function is a weighted averaged of the individual's vNM utility functions (i.e. it is "utilitarian").
- Suppose that social alternatives describe resource allocations, including allocations of some numéraire commodity ("money"). In that case we can use money as a way to implicitly make interpersonal comparisons, by measuring each individual's utility in "money units", and then measuring social welfare using these money units. More generally, if we don't want to use money, then we can use some representative commodity basket as the "numéraire" to measure utility. This can then be combined with other normative criteria (such as concerns for equality or fairness) to evaluate social welfare. Marc Fleurbaey and François Maniquet have developed this approach in their book A theory of fairness and social welfare.
These are just two out of many approaches which have been explored, and my answer here really just presents a very superficial overview of a fairly large and multifaceted domain of academic research. For more information, I suggest that you consult the The Oxford Handbook of Well-Being and Public Policy (edited by Matthew Adler and Marc Fleurbaey). For a more encyclopaedic approach, you could look at the two-volume Handbook of Social Choice and Welfare (edited by Arrow, Sen and Suzumura). Finally, if you are interested in a more philosophical angle, you could also look at John Roemer's book Theories of Distributive Justice.