Yes, the group of Parillo developed an algorithm and a matlab toolbox they called SOSTOOLS
There is a degree of complexity though, I am not an expert in their algorithm so I don't know how efficient their algorithm is. I remember reading that the sum of squares polynomials are dense in the space of positive semidefinite polynomials by some norm.. I think it was L1 norm. And if you know that your polynomial is positive and convex, then its "more likely" that its a sum of squares (as far as I know, no one has yet shown that there are convex (multivariate) polynomials that are positive but not sum of squares).

