Are infectious diseases caused by people not washing their hands?

No, but the microbes which cause the diseases can spread on people's hands, so good hygiene is an important element of disease control.