Scientists think that signaling mechanisms first evolved in ancient prokaryotes and single-celled eukaryotes like yeasts and then were adopted for new uses by their multicellular descendants. Cell signaling is also critical among prokaryotes. For example, bacterial cells secrete molecules that can be detected by other bacterial cells. Sensing the concentration of such signaling molecules allows bacteria to monitor their own local cell density, a phenomenon called quorum sensing. Quorum sensing allows bacterial populations to coordinate their behaviors in activities that require a given number of cells acting synchronously. One example is formation of a biofilm, an aggregation of bacterial cells adhered to a surface. The cells in the biofilm often derive nutrition from the surface they are on. You have probably encountered biofilms many times, perhaps without realizing it. The slimy coating on a fallen log or on leaves lying on a forest path, and even the film on your teeth each morning, are examples of bacterial biofilms. In fact, toothbrushing and flossing disrupt biofilms that would otherwise cause cavities and gum disease.
Soil-dwelling bacteria called myxobacteria (“slime bacteria”) use chemical signals to share information about nutrient availability. When food is scarce, starving cells secrete a signaling molecule that stimulates neighboring cells to aggregate. The cells form a structure called a fruiting body that produces spores, thick-walled cells capable of surviving until the environment improves. The myxobacteria shown in the picture are the species Myxococcus xanthus.
Urry, Lisa A.. Campbell Biology (p. 213). Pearson Education. Kindle Edition.