This study tests alternative hypotheses concerning the motivations behind the participation by rural households in community work. Using unique data from natural and field experiments in southern Sri Lanka, where irrigated fields have been allocated to farmers by government lottery, we compare quantitatively five possible motives behind community participation: public goods investment, general social capital accumulation, production network formation, risk sharing network formation, and pure altruism. Our empirical results show that community participation patterns are consistent with social capital accumulation behavior to form risk sharing networks. Only a few studies have investigated empirically the process of social capital formation, and our analysis fills the gap in the literature. Our findings also suggest the possibility of a poverty trap: facing negative shocks, poor households may have difficulty in finding time for social capital accumulation and risk sharing network formation; this, in turn, may cause them to become more vulnerable and even poorer.