This paper explores the impact of institutions on the evolution of preferences (culture) and on economic outcomes. Punishment institutions determine the capacity and the individual cost of punishing opportunistic behavior, while preferences are endogenous and can be influenced by a cultural transmission process that is conditioned by the existing punishment institutions. We investigate the interaction and evolution between the preferences for reciprocity or rewarding of the allocator and the preferences to punish hostile behaviour by the investor in a trust game with a costly punishment phase. Our main result provides a rationale for the existence of a strong positive relationship between the quality of society's punishment institutions and the levels of trust achieved. Trust only flourishes in the shadow of efficient sanctioning institutions. The driving force behind this result is that strong institutions are necessary to make the socialization of children towards punishment preferences worthwhile. However, there is no relationship between the level of trust and the distribution of social preferences. Even when there is a high proportion of punishers in the population, a high level of trust will not be obtained if there is not a well-functioning punishment institution.