No short answers like "your brain" please. Say what guides you personally in your life to know what is good and what is bad? How do you decide what friends to hang out with? How did this happen in your life?
Your conscience. Your brain tells you right from wrong, and so does guilt. I dont believe god influences our choices, because why do people do bad things?