A strong memory is that it features a planet (forest on planet?) that has ancient defenses which, at some point, are revived to defend the planet against a hostile force. It has humans and aliens in it. I believe it's part of a trilogy. Aliens and humans are on one side of conflict against bad humans. It was quite modern sci-fi, so probably written in the last 20 years or so.
Possibly Redliners by David Drake. It was first published around 1997.
The Earth is engaged in a war with the Kalendru. After a disastrous mission, the survivors of Strike Force C41 are assigned to protect a group of civilians who are being sent to a new colony.
The landing is a near catastrophe - the ship lands far off the intended mark, and nearly flips over on touch down.
C41's commander Major Farrell organizes the civilians for a march to the proper colony site.
The march itself is nearly as bad as many of the battles C41 had been involved in during the war. It seems almost like the plants and animals evolve to more effectively fight C41 and the colonists.
There are also Kalendru troops on the planet - the survivors of a failed attempt to recover an ancient weapon that Kalendru legends say is on the planet.
In the end, C41 finds the control room for the weapon - a biological control room that directs all native life forms to attack all intruders.
There is much more to it than just the adventure story of soldiers blowing stuff up to reach a goal. There's no way for me to summarise all the other things the novel touches on. Drake himself commented on the things he intended to put into it and what he learned about himself in doing so. That's about the best summary of the real content of the book that you are likely to find.
Even if it's not the book you are looking for, it is still worth your time to read it.
Could be the Faded Sun trilogy by C J Cherryh. The Mri are non-human mercenaries who have a historic reputation of turning on their employers. In the third book Faded Sun: Kutath (1979) a group of Mri, along with a single human who has joined them, are fleeing from a mixed group of humans and a second set of aliens who claim the Mri have once again acted against their erstwhile employers. They take refuge on the Mri ancestral planet. One of the Mri leaders has ancient knowledge that allows her to activate a long dormant planetary defense system.