Answer:
The first thing that determines the thickness of a tree trunk is the species. Some kinds of trees just naturally have a different trunk thickness than others.
The second thing might be the environment. A tree that is experiencing all factors - sun, water, soil, minerals - at an optimum level is going to grow faster, taller, stronger, and thicker than the same species in a less-optimum environment.
A third factor is time. As time passes, the tree trunk increases in diameter - thus a tree that is 50 years old will have a much thicker trunk than one that is 5 year old.
And, in case you’re wondering why or how tree trunks increase in thickness at all, there is a thin layer of cells all around the trunk of a tree, like a sheet that lives under the bark. This layer is called the cambium layer which makes new living tissue for the tree (called phloem and xylem) every year. As the year’s growth comes to an end, the living tissue dies and is pushed outward to appear as bark by the new year’s sheet of cambium cells, which is bigger than the previous year’s - hence, the increase in diameter of the tree every year.