Technically Nothing
In the grand scheme of things, nothing prevents the army from trying to burn the forest in an attempt to deal with the elves in the forest. My thought would be that for an army to do that, their desire to rout the elves is more valuable and/or important to them than the acquisition of all the resources in the forest that they intend to sacrifice to perform the task.
I do not see a reason why it could not have been done in the past, or conversely, having these armies take advantage of fires that might have already sparked in the forests to continue their campaign. Torching the forest and letting it burn happily to destroy a forest may have served as a dire warning that this army is willing to literally burn the land to get what they want. In that case, the fire was as much the method as it was a message.
That an army is willing to callously scorch the earth and not care about noncombatants that might die in such a tactic is something that should be addressed as well. Such callous disregard for life probably has consequences.
... But Wait!
This does not mean, however, that the forest is one conducive to being torched for any number of reasons. Most of them have been mentioned in above answers in more detail.
- Climate and location may limit the forest's ability to burn. Worse, the winds might prevail in a way that blows the smoke from those fires over the army, seriously impeding the army instead of the elves.
- The elves, or the forest itself, has taken preventative measures against the forest burning. The how is less relevant for this question -- the point is that intentional acts are taken to mitigate fire damage. After all, a forest fire doesn't have to be deliberately set by invaders.
- The trees themselves might not burn easy enough. Be they species that don't burn easily or tree that are augmented with limited magic to resist fire, there is enough flora in the forest that won't burn easily enough to make it a viable tactic.
- The residents of the forest certainly won't stand for their home actively being set on fire and may take active measures against it if such a plan is known.
The Army's Side
There is also the army and the world surrounding the army to consider. Sure, they fear and hate elves, but what about the rest of their state/kingdom/country?
As one example, the forest that holds these elves may be sacred to the country's religion, or important to religious rites for some reason. Because of that, they want the elves out, but they can't torch this forest because that would be anathema to the religion of the land.
Counter to the first point, if the army's country hate elves already, their forests may be evil places that need to be cleansed by fire to burn the impure. As such, torching the forest may be the plan the whole time.
Going back to the first point, the forest is needed for resources for the kingdom. Be it food from the animals, or wood from the trees, the bounty of the woods are vital to capture. That they get to kill their feared and hated enemy to do this is a bonus. Can't use the forest's bounty if it's all been torched.
The Magic Question
I haven't even brought up magic into this. As this is tagged as Low Fantasy, I have strived to not really bring it up for individual points. However, it is important to know enough about your magic to know if arson is easier or harder with your limited magic.
It could be that this army has enough magical support to be able to start a forest fire, let it burn, and protect the army. This could make arson rise from a last-ditch effort to a tactic worth attempting to test defences.
Likewise, the inverse could be true as well. Defenses against arson are stronger than an army's ability to set fires.
TL;DR
The TL;DR version is that the question as asked, nothing stops the army from torching the forest (or trying anyway). However there are a multitude of worldbuilding factors that may both encourage and discourage such literal scorched earth tactics.