Self defense or a crime for homeowners using guns

So, when are you within the letter of the law to use lethal force to protect your home and property? (Mar. 10, 2017)