Always locked. I've lived in "quiet, safe" settings in city, town, and country settings but don't like the idea of suddenly hearing someone inside calling my name (or worse, not.)
I grew up in the country, down a long private driveway. It wasn't a setting that encouraged random people arriving at the door, but known friends and family would often enough just turn the door knob, stick a head and foot inside and call out to see if anyone were home. For a short trip into town, the doors were often left unlocked. Some of the people who delivered milk, soda, snacks (I think we had a potato chip and AND a pretzel and licorice man), groceries would open the door and call inside to see if someone were home.
Around the time of the Manson murders, security was tightened a bit and doors were then normally kept locked.
I recall as a young child my mother being on the phone with her sister and I saw a "hobo," an unkempt, beet-faced man walk down the long driveway toward our house. I tried to tell my mother but she wouldn't be interrupted. I moved around the house to see what he was doing and he had his unkindly and grisly face pressed to a back door, then another, then a side door.
I pleaded with my mother but she was pissed off by my (very unusual) interruptions and finally listened only to say, "you made that up." A moment latter, though she put down the phone and I showed her where the man was last, but we soon saw that he was walking away from the house, well down the driveway. She waited to see which way he was going with the intent of driving past him, but he disappeared, into a woods or a ditch maybe.
That incident instilled in me the value of keeping doors locked. I've lived in some bigger houses, one with 8 exterior doors -- too many to have a good sense of which it was even when a contact alarm signalled. No way would I want 8 doors unlocked, or even 1.