Ship sensors monitor for every kind of signal known.
Ship senors are primarily passive detection devices, so they are simply waiting for the blip to appear on the scope, identify it, and measure it.
I think the question raised here about the effective range of sensors over light years is a compelling one. In Star Trek, speed, distant, and time were never monitored carefully to create anything resembling a science fiction continuity.
Distant in Star Trek is relative to plot. This means that the story is written and the details are filled in; they are not driving the story. And this is different from almost all other science fiction, driving we the fans a little squirrely.
Implied in your question is the notion that "isn't it kind of a little ridiculously lucky that they found this guy buried in a desert with their sensors and it just so happened to be another Soong type Android?"
I think the writers intended you to be skeptical. As I recall, B-4 was placed their by Shizon to lure Captain Picard. And so, it was ridiculously lucky and you are right to be skeptical. (Except, it wasn't actually lucky at all -- It was a trap!)
However, on the flip side of the coin, as PointlessSpike mentioned, positrons are not naturally occurring. In Star Trek, rare things are always easier to scan for. (This seems to be a truth in regular life as well. The person acting strangely always stands out in a crowd. We notice the one woman wearing bright red lipstick.) Therefore, positrons are discernible on Star Trek sensors at "great distances." But remember, distance is relative to plot. Frankly, I think several star systems away (easily 15-50 light years) strains credulity even if distance is relative to plot. I can't think of one instance in Star Trek where such fine detail (such as the location of a head) is discernible over a distance greater than the distance from orbitting Starship to a planet.
It would be far more believable to find the android floating in deep space. In this case, there would be no noise and interference from THE PLANET. The ship could have followed faint positron emissions like bread crumbs through space until the android was found.
But at the end of the day, it is subjective.