From a water pollution perspective, nutrient pollution (nitrogen and phosphorus), BOD, pharmaceuticals and pathogens can all reach surface water causing problems both in local waterways, but also downstream in lakes and estuaries. These issues can be lessened with proper storage and disposal of waste. Atmospheric ammonia from animal houses can be a secondary (but important) vector for nitrogen to reach waterways.
Animal operations can also reduce air quality due to particulate matter and odor.