Like many allusions in The Scarlet Letter, this passage is a Biblical allusion. The allusion here is in "...the Daniel who shall expound it..." This is a direct reference to the Old Testament story of Daniel.
Daniel was a prophet in the Old Testament. He is perhaps most "famous" for his story of surviving the lion's den, but beyond this he was also known to be blessed by God with the ability to interpret dreams and visions, and was otherwise gifted in wisdom. Because of his abilities, he was appointed as an advisor to King Nebuchadnezzar.
The allusion then draws on the fact that there is a mystery in the town which needs to be revealed. The allusion to Daniel suggests that it is going to take a divine revelation to expose the identity of the father of Hester's baby.
Daniel of the Old Testament was an important member of the court in Babylon where he became very knowledgeable and pious, gaining the respect of many. He was accomplished at interpretations of dreams, and was also called upon to interpret mysterious handwriting on a wall. This supernatural writing foretold the demise of the Babylonian empire.
In Chapter III of The Scarlet Letter, Roger Chillingworth inquires of a Puritan who is in the market place, "And who, by your favour, Sir, may be the father of yonder babe...?" To this, the Puritan replies with the remark that the magistrates have laid their heads together in vain, so "A Daniel...is yet a-wanting." In other words, one who can reader the supernatural writing that is behind the scarlet A on Hester's bosom is lacking to the community. The magistrates need someone like Daniel who can interpret such things as dreams and read supernatural writing and the souls of others.
This remark by the bystander to Chillingworth is, indeed, ironic as it is Chillingworth in his demonic, rather than divine, scrutiny of the Reverend Dimmesdale who is able to read the "spiritual writing" on the chest of the minister, a writing that comes from the guilt of his conscience. He, then, is the Daniel of whom the bystander says the community is "a-wanting."