How to solve $\sin x +\cos x = 1$?
Hint:
Use the formula $\sin(A+B) \equiv \sin A \cos B + \sin B \cos A$ to write $\sin x + \cos x$ in the form $R\sin(x+\alpha)$, where $R$ and $\alpha$ are numbers that you need to find.
Once you have your $R$ and $\alpha$, simply solve $R\sin(x+\alpha)=1$.
The steps you followed are perfectly correct! The only thing you have to do that you haven't done already is check for extraneous solutions. Whenever we square both sides, there is the chance that we get more solutions than we're looking for.
So, you have correctly deduced that the list $0,90,270,360$ (all angles in degrees) contains all potential solutions. After checking, you've noticed that $270$ is not a solution, but the rest are. So, the solutions are $0,90,$ and $360$.
As for why we get extra solutions: notice that although $270$ does not satisfy the original equation, we have $$ (\sin(270)+\cos(270))^2=(-1)^2=1 $$ Which makes sense, since we just solved the equation $$ (\sin(x) + \cos(x))^2 = 1 $$
Another way to look at this is to consider the equation as representing the intersection of two "curves" in polar coordinates, one being $ \ r = 1 \ $ (the unit circle), the other being the line $ \ \sin \theta \ + \ \cos \theta \ = \ 1 \ \ \Rightarrow \ \ r \sin \theta \ + \ r \cos \theta \ = \ r \ \ \Rightarrow \ \ r \ = \ x + y \ , $ with $ \ r \ $ set equal to 1 . The line has intercepts at ( 1 , 0 ) and ( 0 , 1 ) , meeting the circle at $ \ \theta = 0º \ \ \text{and} \ \ \theta = 90º $ . (360º is considered to be merely another "angle-name" for 0º , so it is not really a distinct solution.)