Agriculture is one of the primary activities in the municipality of Acatzingo, Puebla, Mexico. Agricultural fields are affected by the indiscriminate use of pesticides and hydrocarbon spills, which expose inhabitants to the development of infectious diseases. In the present study, we assessed the likelihood of developing infectious diseases associated with environmental contamination (pesticides and hydrocarbons) in various areas of the municipality of Acatzingo, Puebla, Mexico. A questionnaire was applied to 425 people in four areas of two locations divided according to exposure to hydrocarbons and pesticides. We conducted a binomial analysis using a binary logistic regression model, and the odds ratio (OR) was calculated at p ≤ 0.05. The development of infectious diseases is significantly associated with the geographical zone (p = 0.001). The population of Acatzingo de Hidalgo had a higher predicted probability (54.8%) of developing infections. Zone 3, which is exposed to hydrocarbons, had twice the probability of contracting infections (OR = 1.833, p = 0.093). Factors such as tobacco or alcohol consumption, gender, and age did not influence the development of infectious diseases. However, minors, businesspeople, and individuals with chronic degenerative diseases were more likely to contract infectious diseases. Therefore, it is crucial to implement control and regulation in managing pesticides and hydrocarbon spills to mitigate environmental contamination and the associated risks to human health.