Diseases that can occur commonly in plants will have a huge impact on crop yield and quality. Managing these diseases is a very important component of crop production.
Like managing insect pressure, some of the most important and effective tools farmers have to manage the spread of disease are preventative: crop rotation, selecting the right variety of disease-resistant or disease-tolerant crops, and closely monitoring soil quality and plant nutrition. Healthy crops in healthy soil are less likely to suffer from diseases, but sometimes even the most carefully managed fields have crop disease issues. Just as farmers use insecticide to manage pests, they use fungicide to treat crops with persistent disease issues.
Fungicide can be applied to growing plants as a spray, but it actually works best when applied to the crop before an infection even happens. Farmers use historical records and other indicators to calculate the chance a certain field will have disease pressure; information like weather patterns (precipitation, humidity, or wind from the south spreading new diseases, for example). All crop diseases have certain conditions that they need to spread; by predicting whether or not those conditions will be met, farmers can make decisions about applying preventative fungicide.
The decision to use fungicide is complicated, and it is never taken lightly. Fungicide is expensive, and farmers also have to consider the cost of application whenever they are considering using any kind of product on their crop (diesel, hours in the field, or even soil compaction from driving over it too many times).