Sodapop is upset about Sandy in Chapter 12 of The Outsiders because she has left him heartbroken: she moved to Florida because she was pregnant and the baby was not his. Even though he offered to marry her anyway, she refused him.
The immediate sign of Soda’s pain comes when Ponyboy and Darry are arguing again. Soda suddenly runs out of the house and drops a letter from Sandy that has been returned unopened. The fact that Sandy is not accepting his letters implies that she's cut him off completely, and it makes clear that Soda has been carrying private grief while still trying to keep peace between his brothers.
Soda’s pain over Sandy also connects to his larger breakdown. Throughout the novel, he often acts as the cheerful middle brother and mediator between Ponyboy and Darry. By Chapter 12, Ponyboy realizes he has been so absorbed in his own suffering after Johnny and Dally’s deaths that he has not really noticed Soda’s feelings. Soda has lost the girl he loved, and at the same time he feels torn apart by Darry and Ponyboy’s constant fighting.
When Ponyboy and Darry catch up with him, Soda begs them to stop fighting and remember that they only have each other: "We're all we have left. We ought to be able to stick together against everything." Sandy’s rejection hurts him personally, but the brothers’ fighting makes that hurt worse because it threatens the only family support he has left. His heartbreak over Sandy helps Ponyboy and Darry finally see how much pressure Soda has been under.