Quorum sensing uses small molecules that bacteria can both excrete and sense. When enough bacteria are in one place then the surrounding concentration of these small molecules reaches a critical level and can activate the genes for a variety of different responses including luminescence, virulence (in pathogenic or disease-causing bacteria) and the formation of biofilms:
A recent paper (reference below) looked at a range of different types of biofilm and quorum sensing interactions, in order to explore the different environmental pressures that shaped the differences in these systems. They found that although many species formed biofilms when bany cells joined together some species stopped forming biofilms when they reached a certain cell density. Biofilms are carefully controlled by bacteria, they do not just start growing when a certain number of bacterial cells gather together and then never stop.
Using models of mostly infectious biofilm-forming bacteria (such as Vibrio cholerae which causes cholera) they found that as well as helping to bind the cells together and resist man-made antibiotics (which cannot penetrate the biofilm) the biofilm was also a defense against competing bacteria (and may have helped to out-compete them by covering all available living surfaces with slime). The ability to produce biofilms not only helps the V. cholerae against other invading bacteria, it also helps it gain a hold against the body's own internal bacterial defenses that line the internal gut.
However once the levels of V. cholerae became too high the bacteria often stopped generating the biofilms. This could be for two reasons, firstly the biofilm takes up valuable resources that could be used in growth and division and secondly it prevents the bacteria within it from travelling very far. V. cholerae infect the body by having periods of growth followed by periods of mad colonisation, which works best if the biofilm actually disperses at high cellular density to allow the cells to spread.
This can be contrasted with more sedentary bacteria like P. aeruginosa which likes to settle down once it finds a place to live and occasionally disperse colonies into the body. Rather than loosing its biofilm this bacterial species retains it even at high cell densities. This allows it to out-compete any other bacteria that may be at the site of infection, and hold off both the body's natural defenses and any chemical antibiotic drugs meant to kill it.
Comparisons of different V. cholerae strains revealed a wide range of different biofilm formation patterns between strains, all linked to Quorum sensing signalling. This is likely to depend on the internal environment that specific strains occupy, the amount of competition they face and the necessity for quick and frequent bouts of dispersal.
As biofilms are traditionally studied in P. aeruginosa I found it fascinating to hear about how other bacteria use them in order to colonize their surroundings. In aeruginosa biofilms are a mark of stability, the bacteria have found a place to stay and invest time and energy in making it as safe and indestructible as possible. In cholerae however, the biofilm is just protection for the growing bacteria, until their numbers get high enough to allow them to break out and invade the body.
Nadell CD, Xavier JB, Levin SA, & Foster KR (2008). The evolution of quorum sensing in bacterial biofilms. PLoS biology, 6 (1) PMID: 18232735