Most bacteria can switch between a planktonic, sometimes motile, form and a biofilm mode, in which bacterial cells can aggregate and attach to a solid surface. The transition between these two forms represents an example of bacterial adaptation to environmental signals and stresses. In 'environmental pathogens', namely, environmental bacteria that are also able to cause disease in animals and humans, signals associated either with the host or with the external environment, such as temperature, oxygen availability, nutrient concentrations etc., play a major role in triggering the switch between the motile and the biofilm mode, via complex regulatory mechanisms that control flagellar synthesis and motility, and production of adhesion factors. In this review article, we present examples of how environmental signals can impact biofilm formation and cell motility in the Gram negative bacteria Pseudomonas aeruginosa, Escherichia coli and in the Burkholderia genus, and how the switch between motile and biofilm mode can be an essential part of a more general process of adaptation either to the host or to the external environment.