Recent results from real algebraic geometry and the theory of polynomial optimization are related in a new framework to the existence question of multivariate tight wavelet frames whose generators have at least one vanishing moment. Namely, several equivalent formulations of the so-called Unitary Extension Principle (UEP) from are interpreted in terms of hermitian sums of squares of certain nongenative trigonometric polynomials and in terms of semi-definite programming. The latter together with the results in answer affirmatively the long stading open question of the existence of such tight wavelet frames in dimesion $d = 2$; we also provide numerically efficient methods for checking their existence and actual construction in any dimension. We exhibit a class of counterexamples in dimension $d = 3$ showing that, in general, the UEP property is not sufficient for the existence of tight wavelet frames. On the other hand we provide stronger sufficient conditions for the existence of tight wavelet frames in dimension $d ≥ 3$ and illustrate our results by several examples.