This is a somewhat broad question, because there are a number of different Green's functions in quantum physics. Perhaps the simplest one is the resolvent Green's function for a single-particle system. Its definition is $$G(\omega^{\pm})=\lim_{\delta \rightarrow 0^+}\left[ \omega \pm i\delta - H \right]^{-1}\equiv \frac{1}{\omega\pm i\delta - H},$$ where $H$ is the Hamiltonian. Ignoring the $\delta$, and replacing $\omega \rightarrow E$, you can see how this relates to the time-independent <PERSON> equation: $$H\left|\psi \right>=E\left|\psi \right> \longrightarrow \left[ E - H\right]\left|\psi \right> = 0.$$ Basically, if you apply the operator $G$ to a solution to the <PERSON> equation, $\left|\psi_n \right>$ with energy level $E_n$, you get a pole (the "denominator" vanishes) at $\omega \pm i\delta = E_n$. That is, $$G_{nn}(\omega^{\pm})\equiv\left<\psi_n \right|G(\omega^{\pm}) \left|\psi_n \right>=\frac{1}{\omega \pm i\delta - E_n},$$ has a pole. Then it is clear that the poles of (Tr = trace) $$\mathrm{Tr}{G(\omega^{\pm})}\equiv\sum_{n}^{\mathrm{all\,states}}G_{nn}(\omega^{\pm}),$$ give you the full spectrum. 526
In fact, you can show that the quantity (Im = imaginary part) $$\rho(\omega)=-\frac{1}{\pi}\mathrm{Im}{\mathrm{Tr}{G(\omega^+)}},$$ gives you the density of states of the Hamiltonian $H$.
The resolvent Greens function is valid for a single-particle system, but the concept caries over well to many-body physics, and thus to quantum field theory. However, the definition of the Green's function is not as direct in those cases. The Green's function is given by the probability amplitude that a particle will be added to the vacuum state at a time $t$ and state $n$, and that after time evolution it will be removed at time $t'$ and state $n'$: $$\mathcal{G}(t',n';t,n)=-i\left<\Phi \right|\psi_{n'}(t')\psi_n^\dagger (t) \left|\Phi \right>,$$ where the factor of $i$ appears just as a convention, and $\left|\Phi \right>$ represents the ground state. This definition has a very transparent interpretation, because this quantity is the answer to the question: if in the quantum vacuum, which is (to quote <PERSON> favorite phrase) "a boiling bubbling brew of particles popping in and out of existence," a particle were to pop into existence at time-state $(t,n)$, what is the probability (amplitude) that it would propagate to time-state $(t',n')$? There are a number of different versions of this type of <PERSON>'s function, each useful for a different thing. One thing all of these have in common is that handling them in this form is complicated, and it is much easier to work with their Fourier transforms $$\mathcal{G}{n'n}(\omega^{\pm})=\int\mathrm{d}(t'-t)\,\mathrm{e}^{i(\omega\pm i \delta )(t'-t)}\mathcal{G}(t',n';t,n).$$ As you can see, a complex shift $\delta$ is introduced here, which has to do with the convergence of the integral. This is precisely the origin of it in the resolvent Green's function. 976