Pretty sure the
rule of thumb here in America is in the specificity. If you say "I am going to THE hospital" you are implying a specific one. If you say "I am going to A hostile" you are think of the general category "hospital."
Same for other nouns, but the "church" one is a bit trickier because church can be a verb or a noun.