Since the seminal contribution of Jackson & Wolinsky 1996 [A Strategic Model of Social and Economic Networks, JET 71, 44-74] it has been widely acknowledged that the formation of social networks exhibits a general conflict between individual strategic behavior and collective outcome. What has not been studied systematically are the sources of inefficiency. We approach this gap by analyzing the role of positive and negative externalities of link formation. We find general results that relate situations of positive externalities with stable networks that cannot be "too dense" in a well-defined sense, while situations with negative externalities, tend to induce "too dense" networks.