Prices of food, like all other prices in a market economy, are determined by supply and demand. All other things being equal, more supply leads to lower prices and more demand leads to higher prices.
When a food is in season, the supply of that food is higher. More of the food is available because it is in season. In addition, the food will not have been stored for a long time and so the sellers will not have to make up the cost of storage when they sell the product.
But the main factor is the quantity of the food. It is in season so there is more of it. Because there is more of it, it costs less.