You probably won't like this solution, but it is fully valid, as long as you recognize that for ANY value of x, atan(x) is identically the same as atan2(x,1).
So, if you have a solution in the form you got, you can happily just rewrite in the form I show, and VOILA! You now have it in the form of atan2.
I think you want MATLAB to automatically know that the solution you really wanted was this one:
sol = [-2*atan2(a + (a^2 + b^2)^(1/2),b)
-2*atan2(a - (a^2 + b^2)^(1/2),b)]
where you want MATLAB to recognize the purpose of atan2, which is to handle just such a fraction, providing a 4 quadrant result. That means, it needs to recognize the argument to atan would be a fraction, and then to extract the numerator and denominator, splitting them into distinct arguments for atan2.
I think that will be more difficult. Yes, you could take the expression apart yourself, perhaps using a tool like children to split the argument of atan into a numerator and denominator. Then reform it, using atan2.
I would note that atan2 is NOT one of the options for rewrite.
Copy and paste is so much easier. That is, since you know the form of the solution you want to see, just do it yourself. Sometimes convincing a computer to do the obvious in terms of symbolic computations is hardly worth the effort.