The benefit of flagging your ledge should be obvious the first time you do it -- comfort! You pull up the pig, unflag the ledge, and voila! Comfort. No messing about standing in slings in the morning and evening fighting the bloody thing to take it apart and put it together.
You don't necessarily have to have a clean haul, either -- your flagged ledge will ride around bumps and over roofs better than you might think! I've used my Fish double on well over three hundred nights, having flagged it over hundreds and hundreds of pitches of all kinds, clean and not-so-clean. If you plan on flagging your ledge a lot, however, it would pay to glue an extra layer of fabric over the ends of the ledge, which will abrade when it contacts a roof. Just grab some scrap nylon and a can of contact cement, and have at it. The ends of the ledge will abrade more than the side which rides against the rock, believe it or not.
So that's the first thing you need to do.
The second thing you need to do is buy the best damn knot protector ever made -- one of those long-skinny black plastic funnels with the long spout used for pouring transmission fluid into cars, which you can get from any auto parts store. Saw off the long spout, and you have the perfect funnel = knot protector. Your flagged ledge will ride on it easily.
Note that you cannot flag ledges that use "spreader bars" across the bottom like the Metolius design I once used -- it does not work. Spreader bars are lame, and can also be uncomfortable as you can feel the damn thing below you. Buy a Fish ledge instead.
There have been previously published articles on "how to flag your ledge", obviously written by Ledge Theorists. I am assuming the people who write these things are not Big Wall Theorists, having managed to reach the summit of at least one big wall by legit means, but they sure as hell don't know much about flagging a ledge.
So I will show you the Better Way on how to flag your ledge, by first referring you to this article on Portaledge Flagging Theory. Please do not blame the illustrator, as he was just doing what he is told. I don't know the author, and he may be a very rad climber, but he hasn't flagged his ledge much or he would see all the problems with his system!
So have a look at this illustration on how not to flag your ledge, and I can explain to you the Better Way to do it:

Drawing by Mike Clelland
Oh my gosh, what a clusterfuck! Where do I begin? Let's start at the bottom, and work our way up.
1. See those long straps dangling at the very bottom of the ledge towards the pig? When you haul your flagged ledge, you want to leave the ledge adjusted to hang on the wall. This means the outside straps are longer and the inside shorter -- duh. The longer outside strap of the ledge will dangle all over the top of the pig -- do yourself a favor and tie a loose knot in it so that when the ledge rotates in the wind, the strap doesn't snag on the top of the pig. I'll give Mike Clelland the benefit of the doubt and assume he simplified the Suspension Point Locker of the pig, as it's atrocious! Tell me how you'll open up that pig, anyway?
2. You need a knot protector over the knot. It's true the flagged ledge protects the knot somewhat, but you should use one. The ledge goes on TOP of the knot protector! If you use the kind described above, and not the standard two-liter pop bottle with only the bottom cut out, it will swing nicely.
3. The most glaring mistake with this Ledge Theory drawing is that the lower corner crab is clipped into the knot! This defeats the whole purpose of the system! How can the ledge rotate in the wind if the crab is clipped to the knot? It can't -- sheesh. So you clip that lower crab onto the haul line, NOT the knot! Gads. It is true Portaledge Theory if you think even the strongest gust of wind can push your ledge up the rope.
4. Those crabs on the corners should not be lockers, they should just be standards. Choose ratty old crabs for the job, and leave them on your ledge 24-7 dedicated to purpose. They will get scraped.
5. I'll also give the illustrator the benefit of the doubt when you see the pig tied to the end of the rope. You almost NEVER tie your pig to the end of the rope -- you butterfly it into whatever length of haul line happens to have been used, and you use the excess haul line as lower-out line. There is no place for a figure-8-on-a-bight on a big wall -- use a butterfly always. Always!
The "risers" [I would call this the Suspension Point of the ledge] are shown correctly, clipped in with a dedicated Ledge Suspension Point Locker.
6. Upper corner clipped in, but not the way shown. Use a standard crab, not a locker. If you are forced to clip it to the frame of the ledge as shown, then use two crabs to maintain an extra degree of freedom. I use a single crab clipped into the base of the nylon suspension strap, works fine.
When unflagging your ledge, the best thing to do is to get a double-length sling, and clip it to an anchor as far left or as far right as you can. Take the top crab off the rope, clip it to the double length sling. You can then repeat with the main Suspension Point Locker of the ledge, without having to unclip the remaining crab from the haul line. This way, your ledge is always clipped, is never soloing, and you're never struggling.
So there you have it -- the Better Way to flag a ledge. Not only do you belay in comfort, but you have more time to sit around drinking coffee in the morning and drinking beer in the evening, since you're not farting around playing with your ledge.
If you find these Dr. Piton Big Wall Tips of the Day useful, please say so! I wrote this one after coming down off The Prow with my benefactor, so it's all fresh in me 'ead how to write it.
Cheers and coffee [as it is not quite yet Changeover Time]
Dr. Piton
Happily ensconced in his Yosemite Office