Plasmid-mediated horizontal gene transfer influences bacterial community structure and evolution. However, an understanding of the forces which dictate the fate of plasmids in bacterial populations remains elusive. This is in part due to the enormous diversity of plasmids, in terms of size, structure, transmission, evolutionary history and accessory phenotypes, coupled with the lack of a standard theoretical framework within which to investigate them. This review discusses how ecological factors, such as spatial structure and temporal fluctuations, shape both the population dynamics and the physical features of plasmids. Novel data indicate that larger plasmids are more likely to be harboured by hosts in complex environments. Plasmid size may therefore be determined by environmentally mediated fitness trade-offs. As the correlation between replicon size and complexity of environment is similar for plasmids and chromosomes, plasmids could be used as tractable tools to investigate the influence of ecological factors on chromosomes. Parallels are drawn between plasmids and bacterial facultative symbionts, including the evolution of some members of both groups to a more obligate relationship with their host. The similarity between the influences of ecological factors on plasmids and bacterial symbionts suggests that it may be appropriate to study plasmids within a classical ecological framework.