We study matching and coalition formation environments allowing complementarities and peer effects. Agents have preferences over coalitions, and these preferences vary with an underlying, and commonly known, state of nature. Assuming that there is substantial variability of preferences across states of nature, we show that there exists a core stable coalition structure in every state if and only if agents' preferences are pairwise-aligned in every state. This implies that there is a stable coalition structure if agents' preferences are generated by Nash bargaining over coalitional outputs. We further show that all stability-inducing rules for sharing outputs can be represented by a profile of agents' bargaining functions and that agents match assortatively with respect to these bargaining functions. This framework allows us to show how complementarities and peer effects overturn well known comparative statics of many-to-one matching. We study matching and coalition formation environments allowing complementarities and peer effects. Agents have preferences over coalitions, and these preferences vary with an underlying, and commonly known, state of nature. Assuming that there is substantial variability of preferences across states of nature, we show that there exists a core stable coalition structure in every state if and only if agents' preferences are pairwise-aligned in every state. This implies that there is a stable coalition structure if agents' preferences are generated by Nash bargaining over coalitional outputs. We further show that all stability-inducing rules for sharing outputs can be represented by a profile of agents' bargaining functions and that agents match assortatively with respect to these bargaining functions. This framework allows us to show how complementarities and peer effects overturn well known comparative statics of many-to-one matching.