Is there a way to describe all finite groups $G$, such that $\operatorname{Aut}(G) = D_4$?
Two groups, that definitely satisfy that condition are $D_4$ itself and $\mathbb{C}_2 \times \mathbb{C}_4$.
I have read somewhere, that those two groups are the only two groups, that satisfy that condition. There was no proof of this statement given, however, so I do not know whether it is true or false (And if it is true, it would be interesting to know the proof).
Any help will be appreciated.
Yes, this is true. This is Theorem 6.3(d) in the paper, “On solving the equation $\operatorname{Aut}(X) = G$“, by H. K. Iyer, Rocky Mountain J. Math. 9, No. 4, (1979), 653-670. The theorem lists all finite groups with automorphism group a dihedral group. There are many other results of a similar nature in the paper as well.