It's hard to ascertain why exactly he didn't hurt them, as Tolkien doesn't give insight as to what Saruman is thinking then (or at all).
"It was an evil phantom of Saruman"
'That would not baffle a Ranger,' said Gimli. 'A bent blade is enough for Aragorn to read. But I do not expect him to find any traces. It was an evil phantom of Saruman that we saw last night. I am sure of it, even under the light of morning. His eyes are looking out on us from Fangorn even now, maybe.'
Thus says Gimli, not the narrator, Tolkien himself, so we can't confirm if this is accurate or not. If we assume that what Gimli says is accurate, then: Saruman's "phantom" wouldn't have been able to harm The Three Hunters. Phantom is another word for ghost, and the only other ghosts we know are the Dead Men of Dunharrow.
(Legolas) 'Pale swords were drawn; but I know not whether their blades would bite, for the Dead needed no longer any weapon but fear.'
Not only that, Saruman doesn't seem to leave a "boot-print" in the grass.
'And do not forget that old man!' said Gimli. 'I should be happier if I could see the print of a boot.'
'Why would that make you happy?' said Legolas.
'Because an old man with feet that leave marks might be no more than he seemed,' answered the Dwarf.
Christopher Tolkien also writes on this in HoME.
Against Gandalf's words my father wrote in the margin: Vision of Gandalf's thought. There is clearly an important clue here to the curious ambiguity surrounding the apparition of the night before, if one knew how to interpret it; but these words are not perfectly clear. They obviously represent a new thought: arising perhaps from Gandalf's suggestion that if it was not Saruman himself that they saw it was a 'vision' or 'wraith' that he had made, the apparition is now to emanate from Gandalf himself. But of whom was it a vision? Was it an embodied 'emanation' of Gandalf, proceeding from Gandalf himself, that they saw? 'I look into his unhappy mind and I see his doubt and fear', Gandalf has said; it seems more likely perhaps that through his deep concentration on Saruman he had 'projected' an image of Saruman which the three companions could momentarily see.
This would thus be the most evidence-supported answer, but if you aren't satisfied with what Chris has to say, carry on reading.
He didn't know who The Three Hunters were at that time and was too preoccupied
Why would you kill a bunch of travellers having a campfire for no reason? Saruman was also preoccupied with other stuff (quote below) so he quickly goes back to Isengard instead of pausing to ask or infer who the travellers were.
He was doubtful, fearful, and totally lacking in the skill of woodcraft. Gandalf confirms this.
'The victor would emerge stronger than either, and free from doubt,' said Gandalf. 'But Isengard cannot fight Mordor, unless Saruman first obtains the Ring. That he will never do now. He does not yet know his peril. There is much that he does not know. He was so eager to lay his hands on his prey that he could not wait at home, and he came forth to meet and to spy on his messengers. But he came too late, for once, and the battle was over and beyond his help before he reached these parts. He did not remain here long. I look into his mind and I see his doubt. He has no woodcraft. He believes that the horsemen slew and burned all upon the field of battle; but he does not know whether the Orcs were bringing any prisoners or not. And he does not know of the quarrel between his servants and the Orcs of Mordor; nor does he know of the Winged Messenger.'
[...]
' His thought is ever on the Ring. Was it present in the battle? Was it found? What if Theoden, Lord of the Mark, should come by it and learn of its power? That is the danger that he sees, and he has fled back to Isengard to double and treble his assault on Rohan. And all the time there is another danger, close at hand, which he does not see, busy with his fiery thoughts. He has forgotten Treebeard.'
Saruman was busy with his fiery thoughts, and so getting back to Isengard quickly was his main priority, not finding out who The Three Hunters were.
Saruman didn't even realise The Three Hunters were there
The least likely point, but still possible. Remember: Saruman was awaiting the return of his Uruk-hai, which were supposed to be carrying back the Hobbits. Being eager, it is very likely he didn't see The Three Hunters, who were still wearing their Elven-cloaks.
We know Éomer and his company misses The Three Hunters in broad daylight.
He (Éomer) bent his clear bright eyes again upon the Ranger. 'That is no name for a Man that you give. And strange too is your raiment. Have you sprung out of the grass? How did you escape our sight? Are you elvish folk?'
Further supporting evidence that Saruman didn't realise they were there (he didn't react at all):
Suddenly Gimli looked up, and there just on the edge of the fire-light stood an old bent man, leaning on a staff, and wrapped in a great cloak; his wide-brimmed hat was pulled down over his eyes. Gimli sprang up, too amazed for the moment to cry out, though at once the thought flashed into his mind that Saruman had caught them. Both Aragorn and Legolas, roused by his sudden movement, sat up and stared. The old man did not speak or make, sign.
Though, it's hard not to notice a bunch of travellers sitting next to a brightly-lit, burning fire.
With that he fell asleep. Legolas already lay motionless, his fair hands folded upon his breast, his eyes unclosed, blending living night and deep dream, as is the way with Elves. Gimli sat hunched by the fire, running his thumb thoughtfully along the edge of his axe. The tree rustled. There was no other sound.
Suddenly Gimli looked up, and there just on the edge of the fire-light stood an old bent man, leaning on a staff, and wrapped in a great cloak; his wide-brimmed hat was pulled down over his eyes.
Moving on to your point on the horses: They smelt their long-lost friend Shadowfax, but it's unclear as to why they ran away in the first place.
'No,' said Legolas. 'I heard them clearly. But for the darkness and our own fear I should have guessed that they were beasts wild with some sudden gladness. They spoke as horses will when they meet a friend that they have long missed.'
Legolas adds on:
'Now I understand a part of last night's riddle,' said Legolas as he sprang lightly upon Arod's back. 'Whether they fled at first in fear, or not, our horses met Shadowfax, their chieftain, and greeted him with joy. Did you know that he was at hand, Gandalf?'