I'm given that
$$\left(x-c_1\frac{d}{dx}\right)^nf(x) = 0$$
I have to solve for $f(x)$ in terms of $n$.
For $n=0$: $$f(x)=0 \tag{0}$$
For $n= 1$:
$$\begin{align} xf(x) - c_1f'(x) &= 0 \\ \quad\implies\quad f(x) &= c_2\exp\left(\frac{x^2}{2c_1}\right) \tag{1} \end{align}$$
For $n=2$: $$\begin{align} \left(x-c_1\frac{d}{dx}\right)^1(xf(x) - c_1f'(x)) &= 0 \\[4pt] \quad\implies\quad x^2f(x) -xc_1f'(x) -c_1(f(x)+xf'(x)) +c_1^2f''(x) &=0 \\[4pt] \quad\implies\quad f(x) = k_1\exp\left(\frac{-x^2}{2c_1}\right) + k_2x\exp\left(\frac{-x^2}{2c_1}\right) & \tag{2} \end{align}$$
The case for $n= 3$ gets so complicated that I haven't put up the solution.
The solution is based on hermitian polynomials.
One can solve it recursively. For example, let $f_n(x)$ be such that $$\left(x-c_1\frac{d}{dx}\right)^nf_n(x)=0.$$ Then one needs to find $f_{n+1}(x)$ such that $$\left(x-c_1\frac{d}{dx}\right)^{n+1}f_{n+1}(x)=0$$ $$\Leftrightarrow \left(x-c_1\frac{d}{dx}\right)^n\left[\left(x-c_1\frac{d}{dx}\right)f_{n+1}(x)\right]=0$$ $$\Leftrightarrow \left(x-c_1\frac{d}{dx}\right)f_{n+1}(x)=f_n(x),$$ where the latter can be solved by the standard method (e.g. using integrating factor) to yield $$f_{n+1}(x)=e^{\frac {x^2}{2c_1}}\int\frac{f_n(x)}{-c_1}e^{-\frac{x^2}{2c_1}}~dx.\quad (1)$$
As Maxim observed in the comment, the answer turns out to be simple. No Hermitian polynomials are needed. Let $D=x-c_1\frac{d}{dx}$. There case $n=0$ being trivial, one needs to check that the solutions to $$D^nf(x)=0,n\geq 1$$ are given by $$f_n(x)=p(x)e^{\frac {x^2}{2c_1}},$$ where $p(x)$ is a polynomial with $\deg p\leq n-1.$
This can be proved by induction. You already obtained the case $n=1$. Assume the result is true for some $n\geq 1$, so the solutions to $D^nf(x)=0$ is of the form $$f_n(x)=p(x)e^{\frac{x^2}{2c_1}},\deg p\leq n-1.$$ Now by (1), one solves the equation $D^{n+1}f=0$ and obtains (up to constant multiple) $$f_{n+1}(x)=e^{\frac{x^2}{2c_1}}\int p(x)~dx=q(x)e^{\frac{x^2}{2c_1}},$$ for some polynomial $q(x)$ with $\deg q\leq n.$ QED