For a compact Kähler manifold, we say that a form is primitive if it is contaned in the kernel of the dual Lefschetz operator, or the coLefschetz operator. For all examples I know, a primitive form $\omega$ is closed with respect to the $d$ de Rham exterior derivative if and only if $\omega$ is harmonic. I suspect that this is true for any compact Kähler manifold, but I don't know how one would prove it.

$\begingroup$ @Lars: Just to be clear, $\omega$ in your question is an arbitrary primitive form right? The reason I ask is that $\omega$ is usually reserved for the Kähler form. $\endgroup$ – Michael Albanese Nov 21 '17 at 22:31
If $\omega$ is harmonic, then it is $d$closed. For the other direction, suppose $\omega$ is $d$closed and primitive, i.e. $d\omega = 0$ and $\Lambda\omega = 0$. Then, by a Kähler identity,
$$i\bar{\partial}^*\omega = [\Lambda, \partial]\omega = \Lambda(\partial\omega)  \partial(\Lambda\omega) = \Lambda(\partial\omega)$$
and similarly $i\partial^*\omega = \Lambda(\bar{\partial}\omega)$. So
$$d^*\omega = \partial^*\omega + \bar{\partial}^*\omega = \Lambda(i\bar{\partial}\omega  i\partial\omega) = \Lambda(d^c\omega)$$
where $d^c = i(\bar{\partial}\partial)$. So $\omega$ is harmonic if and only if if $d^c\omega$ is primitive.
If $\omega$ is a $(p, q)$form, then $d\omega = 0$ is equivalent to $\partial\omega = 0$ and $\bar{\partial}\omega = 0$, in which case it follows that $\partial^*\omega = 0$ and $\bar{\partial}^*\omega = 0$. Therefore $d^*\omega = 0$ and hence $\omega$ is harmonic.
I'm not sure if the statement still holds if $\omega$ is an arbitrary form. The issue is that $d\omega = 0$ does not necessarily imply $\partial\omega = 0$ and $\bar{\partial}\omega = 0$ in this case.