Consider, for example, Lorentz transformations. The law of transformation of a field (of any kind) \phi(x) is:
\begin{equation}U^\dagger(\Lambda)\phi(x)U(\Lambda)=S(\Lambda) \phi(x) \end{equation}
where U(\Lambda) is the representation of the Lorentz group on the space of physical states. This means that if you perform a transformation \Lambda a state |p\rangle transform as: |p'\rangle=U(\Lambda)|p\rangle. On the other hand of the equation, S(\Lambda) is a representation of Lorentz group over the space of operators (fields) and which has the role to transform, for example, the field components if the field is a vector one.
When you require the invariance of the vacuum state this means to ask for:
U(\lambda)|0\rangle=|0\rangle. If you require this and you consider the vacuum expectation value then you have:
$$\langle0|\phi(x)|0\rangle=\langle0|U^\dagger (\Lambda) \phi(x)U(\Lambda)|0\rangle$$
that is satisfied if the field transform with S(\Lambda)=1, which means that it doesn't have any components to transform, i.e. is a scalar field.
You can do the same thing for translation,s considering that, if you have a translation with a parameter a, then the law is:
\begin{equation}U^\dagger(a)\phi(x)U(a)=\phi(x+a) \end{equation}
If you apply the reasoning made previously you obtain:
$$\langle0|\phi(x)|0\rangle=\langle0|\phi(x+a)|0 \rangle$$
that is the vacuum expectation value calculated in two different points. This equation is satisfied if the expecation value itself is constant over x.
I hope I didn't make any mistakes
