It’s generally the result of decisions you make in sTalk conversations.
For a spoiler-filled breakdown of how to get a certain alignment, check out this or this in our wiki.