As sanity decreases, the light's color will change from green to yellow, then to orange and finally red. You can check how much sanity you have left by looking at the blinking light to the left of Bonnie's door.
Decreased sanity will result in the screen turning gray, shaking and hallucinations.
Sanity will drain gradually through the night, but will drain faster by looking at animatronics or sleeping, and will drain slower by looking at the lamp while it's on.