Bad environment can consist of these:
1. Presence of infectious microbes in air
2. Sanitation issues related to land and water - improper drainage system, standing water, littered waste.
3. Negative people who cause stress and anxiety - social factors can also make people sick - hypertension and blood pressure related problems are often casued by this.
Even if there is no such agents present, people tend to get if they have a weak immune system because even in a healthy environment, a lot of microorganisms exist and if our bodies are susceptible to them, we will get affected.
For example, people catch cold due to pollen grains during spring season and rainy season.
Also, people can get ill by infectious human contact as in Sexually Transmitted diseases, cholera, chicken pox etc. Also, by injection of bacteria/virus in your body by external agents like syringes, barber's blade, any cuts on your body etc.