Well, Tane is attributed with many qualities that make him the
god of many things and not only the forest and he has many names
which commerate different deeds.
However, the question refers to Tane Mahuta. Tane-Mahuta
literally means Tane-the-riser (he who makes things rise such as
trees rising out of the ground) therefore in this sense he is the
god of the forest.
The naming of the large Kauri with that of Tane-Mahuta is mainly
due to the fact that it is the largest tree in NZ and therefore it
would be right to name it after the god of the forest.