By the way, there is a related theorem which says that if you have a sequence which satisfies a recurrence where the coefficients are polynomials in $n$, then the EGF satisfies a differential equation where the coefficients are polynomials in $x$.
To see how this all connects, consider the two operations:
$$
\frac{d}{dx} \sum a_n \frac{x^n}{n!} = \sum a_{n+1} \frac{x^n}{n!} \text{ and } x \sum a_n \frac{x^n}{n!} = \sum n a_{n - 1} \frac{x^n}{n!}
$$
See if you just have the derivative operator then you can shift the coefficients and so a recurrence like $f_{n + 2} = f_{n + 1} + f_{n}$ translates to a differential equation $y'' = y' + y$ (each shift corresponds to a derivative).
If we have coefficients which are in terms of $n$, then we can create these by multiplying by $x$. So in your case
$$
D_{n + 1} = nD_n + nD_{n-1} \text{ translates to } y' = xy' + xy.
$$
This is a homogeneous linear differential equation:
$$
\frac{y'}{y} = \frac{x}{1-x} \implies \log y = -x - \log(1-x) \implies y = \frac{e^{-x}}{1-x}.
$$
And this is of course the EGF for the derangements problem. You can now use another common identity which just comes from multiplying $e^{-x}$ by $\frac1{1 - x}$:
\begin{align}
\frac{1}{1 - x} e^{-x} &= \sum_i x^i \cdot \sum_j \frac{(-1)^j x^j}{j!} \\
&= \sum_n \left( \sum_{i + j = n} \frac{(-1)^j}{j!} \right) x^n \\
&= \sum_n \left( n! \sum_{i + j = n} \frac{(-1)^j}{j!} \right) \frac{x^n}{n!}.
\end{align}
This gives us the formula
$$
D_n = n! \sum_{j = 0}^n \frac{(-1)^j}{j!}.
$$
This method is reversible too! If $y = \frac{e^{-x}}{1 - x}$ then (using the product rule on $e^{-x} \cdot \frac{1}{1 - x}$)
$$
y' = -\frac{e^{-x}}{1 - x} + \frac{e^{-x}}{(1 - x)^2} = -y + \frac{y}{1 - x}.
$$
And that rearranges back to $y' = xy' + xy$ which corresponds to $D_{n + 1} = nD_n + nD_{n - 1}$.