On a countable tree $T$, allowing vertices with infinite degree, we consider an arbitrary stochastic irreducible nearest neighbour transition operator $P$. We provide a boundary integral representation for general eigenfunctions of $P$ with eigenvalue $lambda in mathbb{C}$. This is possible whenever $lambda$ is in the resolvent set of $P$ as a self-adjoint operator on a suitable $ell^2$-space and the on-diagonal elements of the resolvent (Green function) do not vanish at $lambda$. We show that when $P$ is invariant under a transitive (not necessarily fixed-point-free) group action, the latter condition holds for all $lambda e 0$ in the resolvent set. These results extend and complete previous results by Cartier, by Fig`a-Talamanca and Steger, and by Woess. For those eigenvalues, we also provide an integral representation of $lambda$-polyharmonic functions of any order $n$, that is, functions $f: T to mathbb{C}$ for which $(lambda cdot I - P)^n f=0$. This is a far-reaching extension of work of Cohen et al., who provided such a representation for simple random walk on a homogeneous tree and eigenvalue $lambda =1$. Finally, we explain the (much simpler) analogous results for forward only transition operators, sometimes also called martingales on trees.