Ecological and economic systems are alike in that individual agents compete for limited resources, evolve their behaviors in response to interactions with others, and form exploitative as well as cooperative interactions as a result. In these complex adaptive systems, macroscopic properties like the flow patterns of resources like nutrients and capital emerge from large numbers of microscopic interactions, and feed back to affect individual behaviors. Contagion can lead to critical transitions from one basin of attraction to another, as for example with eutrophication, desertification, pest outbreaks, and market collapses. In both sorts of systems, evolution of one type or another leads to the differentiation of roles and the emergence of system organization, but with no guarantee of robustness. It is crucial to understand how evolutionary forces have shaped individual behaviors in the face of uncertainty. In this talk, I will explore the common features of these systems, especially as they involve the evolution of intragenerational and intergenerational resource allocation and the evolution of cooperation in dealing with public goods, common pool resources and collective movement. I will describe examples from bacteria and slime molds to vertebrate groups to insurance arrangements in human societies.