Did purple beans spoil my soup?
Purple beans just have slightly different pigments in them, and the purple actually goes away when you cook them.

There's nothing particular about that pigment that would cause your soup to go bad.  While it's possible that the beans, or some other ingredient, caused it to go bad, it's not the color, itself, at fault.

The "foaming" and sour taste you describe in your comments suggests fermenting or bacterial activity.  I'd guess something was off with dried beans that you soaked and cooked, since you see that kind of activity start if you let beans soak for way longer then needed just to re-hydrate them.  Did they get both soaked, and then fully cooked?

Anyway, that's a more likely candidate vs. the color of a fresh or frozen snap bean.

EDIT - I see that the OP commented that she gave some of the snap beans to a friend, who blanched them right away and said they went bad.  Sounds like the snap beans could be the culprit, though not because of their color, per se.