It can be derived from the classical wave equation for photons and the de Broglie wavelength. Suppose you have an electromagnetic wave
$$\psi = Ae^{i (\mathbf{k} \cdot \mathbf{r} - \omega t)}.$$
Taking the spatial derivative yields
$$\nabla^2 \psi = - k^2 \psi.$$
Since $\hbar k = p$,
$$-\frac{\hbar^2}{2m} \nabla^2 \psi = \frac{p^2}{2m}\psi.$$
Taking the time derivative yields
$$\frac{\partial \psi}{\partial t} = -i \omega \psi.$$
Since $\hbar \omega = E$,
$$ i \hbar \frac{\partial \psi}{\partial t} = E \psi.$$
The energy is
$$E = \frac{p^2}{2m} + V.$$
Hence
$$i \hbar \frac{\partial \psi}{\partial t} = -\frac{\hbar^2}{2m} \nabla^2 \psi + V\psi.$$