Biofilms are densely packed communities of microbial cells that grow on surfaces and surround themselves with secreted polymers. Many bacterial species form biofilms, and their study has revealed them to be complex and diverse. The structural and physiological complexity of biofilms has led to the idea that they are coordinated and cooperative groups, analogous to multicellular organisms. We evaluate this idea by addressing the findings of microbiologists from the perspective of sociobiology, including theories of collective behavior (self-organization) and social evolution. This yields two main conclusions. First, the appearance of organization in biofilms can emerge without active coordination. That is, biofilm properties such as phenotypic differentiation, species stratification and channel formation do not necessarily require that cells communicate with one another using specialized signaling molecules. Second, while local cooperation among bacteria may often occur, the evolution of cooperation among all cells is unlikely for most biofilms. Strong conflict can arise among multiple species and strains in a biofilm, and spontaneous mutation can generate conflict even within biofilms initiated by genetically identical cells. Biofilms will typically result from a balance between competition and cooperation, and we argue that understanding this balance is central to building a complete and predictive model of biofilm formation.