The oldest fossils of bacteria-like organisms date back to 3.5 billion years old, making them the oldest known fossils. These early bacteria could survive in the inhospitable conditions when the earth was young, extremely hot with a low oxygen level in the atmosphere. Even to this day, some varieties inhabit such places as deep-sea vents having negligible oxygen and almost no sunlight.
With the help of molecular phylogeny, scientists have pieced together a view of the evolution of bacteria. Over time, bacteria evolved to capture energy from sunlight and thereby carry out the process of photosynthesis to manufacture nutrients. Next, they developed that sort of photosynthesis that plants carry out even today, which involves splitting water to produce oxygen. With oxygen available, organisms that require it, such as animals, could inhabit the earth. So, we need to thank bacteria for whatever living things we see around us.
The cell wall....