Mutualistic networks are formed when the interactions between two classes of species are mutually beneficial and they are important examples of cooperation shaped by evolution. The topological properties of the ecological interaction networks have been the subject of sparkling research and they indicate non-random pattern of community organization. Indeed, ecologists have collected extensive data on species interactions showing that, independently of species composition and latitude, mutualistic networks (such as plant-pollinator systems) have nested architectures: specialist species, with only few mutualistic links, tend to interact with a proper subset of the many mutualistic partners of any of the generalist species. Despite sustained efforts to explain observed network structure on the basis of community-level stability or persistence, such correlative studies have reached minimal consensus. I will show how nested interaction networks could emerge as a consequence of an optimization principle aimed at maximizing the species abundance in mutualistic communities. Optimized networks, although remaining stable, tend to be less resilient than their counterparts with randomly assigned interactions. I will conclude by discussing the relationship between stability and localization in ecological networks and showing how our approaches provide a broader perspective on the study of the interplay between interaction network architecture and stability of ecological communities.