According to the NYTimes, it was at dinner the night before that someone whispered into Sorondo's ear that the Pope would give Bernie an audience if he was in the lobby of the Casa Santa Maria at 6 am before he flew out to Greece. That was all the time Bernie needed to make this trip worth the effort. After all, what's a trip to the Vatican without an audience with the Pope, be it ever so brief.
What Bernie gains from it remains to be seen, as the two days probably would have been better spent campaigning in New York where he trails Hillary Clinton. Some felt it was a cynical attempt to court Catholic voters in New York, but that's not really Bernie's style. More likely, he wanted to communicate that he was on the same page as the Pope when it came to economic and social equality.
The Pope had been burned once before by Kim Davis, and I'm sure was not overly happy about the impromptu visit arranged by Bishop Sorondo. The Pope probably knows that Bernie is spreading a message similar to his, but made it abundantly clear it was nothing more than courtesy greetings that were exchanged, as he did not want anyone to think he was playing favorites in America's election cycle.
The bigger concern is Bernie's speech at the PASS convention, as he was pretty harsh on the American economic system. This no doubt went over well with this Vatican audience, but he has been sharply criticized back home. Bill Clinton quipped that Sanders' fans "would shoot every third person on Wall Street." Not a bad idea actually, however most Americans still haven't warmed up to Sanders' vision of Social Democracy, and it would probably be better if Bernie found some kind of middle ground, especially with so many delegates at stake in New York. Bernie is once again being seen as the grumpy socialist.
Nevertheless, the visit did deflect attention away from Thursday night's debate, which pundits felt he was unable to shake Hillary on the question of judgement. Continually bringing up her vote on the Iraq War is the equivalent of holding her to blame on Benghazi, which the Republicans do. Bernie has to find other matters to question her judgement on.
Unfortunately, the impromptu trip comes across as a Hail Mary, a last desperate gesture before the New York primary this Tuesday to pull out a miracle victory. Bernie would have been much better off pushing his message on the stump rather than at a Vatican convention, which only served to put his motives in question.