Let $\mu$ be a probability measure on $(\mathbb R,\mathcal B(\mathbb R))$.
Is $C_c^\infty(\mathbb R)$ dense in $L^p(\mu)$ for all $p\ge1$?
Let $\lambda$ denote the Lebesgue measure on $(\mathbb R,\mathcal B(\mathbb R))$. We know that $C_c(\mathbb R)$ is dense in $L^p(\lambda)$ for all $p\ge1$. Since, $C_c^\infty(\mathbb R)$ is dense in $C_c(\mathbb R)$, we can conclude that $C_c^\infty(\mathbb R)$ is dense in $L^p(\lambda)$ for all $p\ge1$.
Now, I'm especially interested in the case where $\mu$ has a density $f$ with respect to $\lambda$. It would be even fine for me to assume that $f\in C^2(\mathbb R)$ and that $f>0$. Moreover, it would be sufficient for me to obtain the desired claim for $p=2$?
Is there any chance to use the known result for the Lebesgue measure?
There is the following general statement which you can find in Measures, Integals and Martingales by R. Schilling (Corollary 17.9 in the 2nd edition).
If $\mu$ is a probability measure on $(\mathbb{R}^n,\mathcal{B}(\mathbb{R}^n))$, then the assumption that $\mu$ assigns finite measure to compact sets is trivially satisfied, and hence $C_c^{\infty}(\mathbb{R}^n)$ is dense in $L^p(\mu)$ for all $p \geq 1$.