Very much depends on the gun.
A little snubnose, I would be deadly inside 15-20 yards.
I feel like I could shoot a deer inside 50 yards and feel ethical about it, especially if I have a red dot sight. That is about where I am at as far as hitting a target the size of a whitetail's vital organs.
50 yards or less is about the typical distance a shot presents itself out in the woods here. The woods are thick, and beyond 50 yards there will usually be so much between the muzzle and the deer that I would question myself, and at that point its about time to just put the gun down and wait for another.