Threat depends on proximity, circumstance, time, and ability to harm.
I used to own a large piece of property in the country. Several times whilst I was out inspecting it I would see people on it. Typically, I drove up to them (or walked) and asked them what they were doing. Almost all the time they were either “just walking” or returning home from fishing. No harm, no foul.
A couple of times people on the property had guns. Typically .22s or shotguns. When asked what they were doing, they were either “hunting” or returning from hunting elsewhere. At this point, because many casual hunters seem to take offense when told they can’t illegally hunt without permission on someone elses property, I considered them a threat. However, you have to use diplomacy when they have guns, and I would ask them nicely to leave. If they didn’t, I would note what I could, wait, and call the police later. If they started to threaten me or get bellicose…well, being alone and small and in the country, I always carried my gun too. Typically my Mini-14 but sometimes my AR15 HBAR (if I didn’t have to walk far - damn thing is heavy). No prizes for guessing who would win that argument all other things equal…
Now that I’m all citified - someone in my yard gets the same response, sans firearms. I want to know what they’re doing there, and if it’s something I don’t approve of I ask them to leave and note who they are or how they looked. In my back yard, which means they have to enter a fenced area, I would be much less likely to bother to ask, and would likely tell whoever it is to leave at once.
In the house, everything changes. There is typically no rational reason for any person to be in my house without my knowledge and consent. Then they can be considered a threat until proven otherwise.
Is deadly force called for? Once again, it depends on proximity, circumstances, and time. I walk in to my house and there’s a strange man in the kitchen, I likely head calmly for the nearest weapon, and keep it in behind me while asking why they’re there. If I was, say, upstairs and heard someone enter my front door and walk around, then same thing.
Worst case? I know a few people in GD (and less brave people elsewhere) have tried to characterize me as dangerously psychotic and trigger happy based on this, despite all the qualifiers I typically use, but at night everything changes. If I wake up to find a strange person in my house, that strange person has little chance avoiding being shot.