In this paper we first prove a general representation theorem for generators of backward stochastic differential equations (BSDEs for short) by utilizing a localization method involved with stopping time tools and approximation techniques, where the generators only need to satisfy a weak monotonicity condition and a general growth condition in $y$ and a Lipschitz condition in $z$. This result basically solves the problem of representation theorems for generators of BSDEs with general growth generators in $y$. Then, such representation theorem is adopted to prove a probabilistic formula, in viscosity sense, of semilinear parabolic PDEs of second order. The representation theorem approach seems to be a potential tool to the research of viscosity solutions of PDEs.