You should add as a second argument to solve the variable(s) to solve for, which is x in your case:
sage: solve(x^2+3*x+2==0, x)

Type solve? for more details and examples.