Personally, I find that the easiest way to know when to use the subjunctive is by using the acronym WEDDING.
W- wish/will
e.g. querer que, desear que, preferir que. Mi amigo quiere que salga con su novia. My friend wants me to go out with his girlfriend.
E- emotion
e.g. esperar (to hope), temer (to fear). El profesor espera que los alumnos tengan éxito en los examenes. The teacher hopes that his students succeed in their exams.
D- doubt
e.g. dudar. Dudo que sea auténtico. I doubt that it's real.
D- denial
e.g. negar. No se puede negar que sea un tema muy polémico en el mundo de hoy en día. One can't deny that it's a very controversial topic in the world today. (This is also a fantastic essay phrase!)
I- impersonal expressions
e.g. es necessario que, es mejor que. Es necessario que vayas al doctor. It is necessary that you go to a doctor.
N- negation
e.g. no creo que, no pienso que. No pienso que comas bien. I don't think you eat well.
G- God
e.g. Ojalá que. !Ojalá que ganemos la lotería! I really hope we win the lottery!