My favorite explanation in a nutshell can be found above in knightlysirjames' response: "The best place for evil to hide, is behind the appearance of virtue." This is one of the best phrases that can sum up Polonius' devious and rambling character who is taken to spying on absolutely everyone: not only Hamlet but also Polonius' own son, Laertes.
Putting Polonius' request in context, consider that the beginning of this scene finds the king and queen discussing how to get the truth out of Hamlet's "mad" condition. They finally turn to Ophelia: the object of Hamlet's affections. It is out of obedience to elders, and not out of deviousness in her own character, that Ophelia obeys. Let's look at the entire response of Polonius so that we can dissect this further:
Ophelia, walk you here. Gracious, so please you,
We will bestow ourselves. Read on this book,
That show of such an exercise may colour
Your loneliness. We are oft to blame in this—
'tis too much proved—that with devotion's visage
And pious action we do sugar o'er
The Devil himself.
Here Polonius is instructing Ophelia, or perhaps I should say demanding of Ophelia, that she walk alone with her book of Roman Catholic prayers and devotions. With Ophelia reading these saintly words, "such an exercise" will "colour" her loneliness. In other words, Ophelia should look like she is finding peace and happiness in God where she had originally been pining for Hamlet. Also, and perhaps more importantly, reading over prayers and devotions should be done in private; therefore, it is a good excuse for her being alone while she runs into Hamlet.
Here we come to the original question. What does this mean: "With devotion's visage and pious action we do sugar o'er the Devil himself." And here we come back to knightlysirjames' original answer: "The best place for evil to hide, is behind the appearance of virtue." If you wish to put it closer to the original wording of Polonius (but in modern-day terms), you could say that in looking devout and holy, we hide our own evil in sweetness.
Oh, how ironic it is that Polonius says, "WE are oft to blame in this" and "WE do sugar o'er the Devil"! He certainly IS "oft to blame"! Polonius is one of the most devious characters of Shakespeare's play, and is eventually killed due to his spying.
Polonius has promised the Queen that he will have Ophelia try to learn what is causing Hamlet's madness. So, he has his daughter pretend to be reading her daily prayers, or devotions, in order for her state of being alone to be plausible to Hamlet.
Polonius's remark that "with devotion's visage [face] / And pious action we do sugar o'er / The devil himself" means that with the pretense of prayer and saintliness the devil himself can be covered up. Polonius here makes an admission of the duplicity practiced by himself and others and about to be practiced by his daughter. In an aside, the King agrees, saying that the words have touched his conscience and that he carries the "heavy burden," that is, guilt.