I don't have any proof, but here is my intuition:
I doubt there is any general condition besides obvious
$$\forall x(\alpha \to \beta) \leftarrow (\forall x \alpha \to \forall x \beta). \tag{1}$$
The problem is that it might be true for many different reasons, e.g. the universe being of size one or perhaps the $\forall x \beta$ is true and it makes the implication trivial. Observe that $\forall x(\alpha \to \beta)$ means that a single $x$ satisfying $\alpha$ is enough to make $\beta$ true (some clarification: it does not mean that $\beta$ is true in general, it is true only for that particular $x$). On the other hand $\forall x \alpha \to \forall x \beta$ means that you need $\alpha$ to hold for all the $x$es to satisfy $\beta$. For example, let's assume the universe has more than one element, then:
$$\forall x \Big(P(x) \to \exists y \big(P(x) \land P(y)\big)\Big)$$
would be of first kind (because you can set $y = x$), while
$$\forall x P(x) \to \forall x \exists y(P(x)\land P(y) \land x \neq y)$$
is the second kind, because you need to know, that there are at least two $x$es that satisfy $P$. So the general condition would be something like "from the $\forall x \alpha$ you need only one $x$ to make $\beta$ true", but that is exactly $(1)$.
I hope it explained something ;-)