We don't really know why he decided to let Jimmy go; one thing that O. Henry was really good at was providing really great plot twists right at the ending of stories, which are usually pretty unexpected in any way. He doesn't like to throw a lot of clues in there in many of his stories. In this story, Ben Price specifically went to hunt Jimmy down and put him back in jail. That was the only reason that he went down there. So, it's not really expected for him to deliberately foil that mission.
We do know that he came into town and found out about Jimmy's engagement, and how he had been living a "clean" life, and appeared to be reformed. So, we know that Ben was aware of Jimmy's supposed reformation. He seemed to be pretty uncovinced at the time though. Later, Ben sees the entire episode with the safe and the little girl getting caught in it:
"Ben Price sauntered in and leaned on his elbow, looking casually inside between the railings. He told the teller that he didn't want anything; he was just waiting for a man he knew."
So, he saw the entire thing. Since no other clues are given, we have to infer that he saw Jimmy save the little girl, saw Jimmy with his fiance and how happy they both were, and had mercy on him. Ben's heart was touched, and he decided to give Jimmy a chance at his reformation. As a reader, we have to read in-between the lines and assume that is what happened. Ben let him go because he was touched by Jimmy's willingness to give up his life with his new bride in order to save a little girl's life. That proved to him that Jimmy was trustworthy in his reformation, and worth giving a second chance. I hope that those thoughts helped; good luck!
The reader feels gratified that Ben Price decides not to arrest Jimmy Valentine. This must be because the reader feels Jimmy should be rewarded for saving a little girl from certain death. Ben Price is not quite the same kind of law-enforcement agent as Jimmy Wells in O. Henry's "After Twenty Years." Jimmy Wells is a sworn officer of the law and is duty-bound to arrest 'Silky' Bob, or at least have him arrested, after he recognizes his old friend as the man who is wanted by the Chicago police. Ben Price, on the other hand, is a sort of private detective. These were the days before the federal government began insuring banks and thereby got involved in that aspect of law enforcement. Ben Price can arrest Jimmy Valentine or let him go, as he chooses. Ben acts on the basis of the same feelings he shares with the reader.
We see in the Sherlock Holmes stories, such as "The Adventure of the Blue Carbuncle," that Holmes as a private citizen can and does let criminals go free. Ben Price feels the same way about Jimmy Valentine's act of sacrifice as does the reader.
“Hello, Ben!” said Jimmy, still with his strange smile. “Got around at last, have you? Well, let's go. I don't know that it makes much difference, now.”
And then Ben Price acted rather strangely.
“Guess you're mistaken, Mr. Spencer,” he said. “Don't believe I recognize you. Your buggy's waiting for you, ain't it?”
And Ben Price turned and strolled down the street.
It should be noted that Ben apparently knows that Jimmy has gone straight, that he is getting married to a respectable girl, that he is abandoning his burglar tools, and that he must be giving up his life of crime. So Ben Price has at least two reasons for letting Jimmy go free. One is that Jimmy deserves a great reward for saving the life of a little girl at the risk of losing his freedom and all his claims to happiness. The other reason is that Jimmy is no longer a threat to society. He won't be cracking any more safes, so Ben no longer has a strong motive for taking him out of circulation.