Suppose you know the wavefunction $$\phi(t^\prime,x^\prime)=\langle x^\prime |\phi(t^\prime)\rangle \tag{1} \label{1}$$ (in the Schrödinger picture) at some (fixed) initial time $t^\prime$ and you want to find the wavefunction $$\phi(t,x)=\langle x|\phi(t)\rangle=\langle x|e^{-iH(t-t^\prime)}|\phi(t^\prime)\rangle \tag{2} \label{2}$$ at a later time $t\gt t^\prime$ when the time evolution is governed by the Hamilton operator $H$. Inserting the identity operator $\mathbb{I}$ in the form $$\mathbb{I}=\!\int\limits_{-\infty}^\infty \!dx^\prime |x \rangle \langle x^\prime|, \tag{3} \label{3}$$ eq. \eqref{2} can be rewritten in the form $$\phi(t,x)=\!\int\limits_{-\infty}^\infty \! dx^\prime \langle x |e^{-iH(t-t^\prime)} |x^\prime\rangle \langle x^\prime |\phi(t^\prime)\rangle= \int\limits_{-\infty}^\infty \! dx^\prime \langle x |e^{-iH(t-t^\prime)}|x^\prime\rangle\, \phi(t^\prime, x^\prime). \tag{4} \label{4}$$ Note that the integral kernel $\langle x|e^{-iH(t-t^\prime)} |x^\prime \rangle$ satisfies the homogeneous Schrödinger equation $$\left(i\, \partial/\partial t- H_x\right) \langle x |e^{-iH(t-t^\prime)} |x^\prime \rangle=0, \tag{5} \label{5} $$ where $H_x$ denotes the action of the Hamilton operator in the $x$-representation. As we have assumed $t\gt t^\prime$, we could equally well determine $\phi(t,x)$ from the initial wave function $\phi(t^\prime,x^\prime)$ by
$$\phi(t,x) =\int\limits_{-\infty}^\infty\! dx^\prime \, G^+(t,x;t^\prime,x^\prime) \phi(t^\prime, x^\prime) \tag{6} \label{6}$$ with $$G^+(t,x;t^\prime,x^\prime)= \langle x |e^{-iH(t-t^\prime)} |x^\prime \rangle \, \theta(t-t^\prime), \tag{7} \label{7}$$ where $\theta(t-t^\prime)$ denotes the Heaviside step function. Using \eqref{5} and $\frac{\partial}{\partial t}\theta(t-t^\prime) =\delta(t-t^\prime)$, we find $$\begin{align}\left(i \partial /\partial t -H_x \right) G^+(t,x;t^\prime,x^\prime) &= i\langle x |e^{-iH(t-t^\prime)} |x^\prime \rangle \delta(t-t^\prime) \\[5pt] &= i \langle x | x^\prime \rangle \delta(t-t^\prime)\\[5pt] &= i \delta(x-x^\prime) \delta(t-t^\prime), \end{align} \tag{8} \label{8}$$ showing that $G^+(t,x;t^\prime,x^\prime)$ is indeed the retarded Green function of the differential operator $\partial /\partial t +i H_x$.
As an example, let us consider the Hamilton operator of a free particle, $$H=\frac{P^2}{2m}, \qquad H_x=-\frac{1}{2m} \frac{\partial^2}{\partial x^2}. \tag{9} \label{9}$$ $G^+$ can either be obtained by computing $$\begin{align} G^+(t,x;t^\prime,x^\prime) &=\langle x |e^{-iP^2(t-t^\prime)/2m} |x^\prime \rangle \theta(t-t^\prime) \\[5pt]&= \int\limits_{-\infty}^\infty \! \! dp\, e^{-ip^2(t-t^\prime)/2m} \langle x|p\rangle\langle p|x^\prime \rangle \theta(t-t^\prime) \\[5pt] &= \int\limits_{-\infty}^\infty \! \! \frac{dp}{2\pi}\, e^{-ip^2(t-t^\prime)/2m} e^{ip(x-x^\prime)} \theta(t-t^\prime), \end{align} \tag{10} \label{10} $$ or, alternatively, by inserting the Fourier representation (using translation invariance of the differential operator) $$ G^+(t,x;t^\prime,x^\prime) = \int\limits_{\mathbb{R}^2} \frac{d \omega \,dp}{2\pi} e^{-i\omega (t-t^\prime)} e^{ip(x-x^\prime)}\tilde{G}(\omega,p) \tag{11} $$ into \eqref{8}. The form of $\tilde{G}(\omega,p)$ is easily obtained and the $\omega$-integration can be performed by complex integration choosing the path in such a way that the boundary condition $G^+(t,x;t^\prime,x^\prime) =0$ for $t \lt t^\prime$ is satisfied. In both cases one finds the final result $$G^+(t,x;t^\prime,x^\prime)= \left(\frac{m}{2\pi i (t-t^\prime)} \right)^{\! 1/2}e^{i m(x-x^\prime)^2/2(t-t^\prime)} \theta(t-t^\prime). \tag{12}$$