Yes. Washing your hands with soap and water cleans them of pathogens (bacteria and viruses) and chemicals that can cause disease. Hot water is not enough to clean your hands. Using soap adds to the time spent washing and breaks down the grease and dirt that carry most germs.
The most important times to wash your hands with soap and water are after you use the toilet or before handling food. When not washed with soap, hands that have been in contact with human or animal feces, bodily fluids like mucus, and contaminated foods or water can transport bacteria, viruses, and parasites to others. When done thoroughly and at least for 20 seconds, hand washing can prevent all types of illness and disease, skin infections, and eye infections.