I rarely ever foil meats on the WSM, unless I'm trying to speed up a cook, or unless I'm doing a hot-fast five hour cook on a packer. When you're cooking on a stickburner, you can sometimes risk oversmoking meat if you leave it exposed to woodsmoke for the entire cooking time. I don't have that problem on my DPP Fat 50, but many other styles do. That risk is negligible on a WSM.
Foiling will speed up your cooking session, help keep more moisture in the meat, and can help you add other flavors into the meat by adding additional liquids and seasonings to the foil. It can also destroy (or at least soften) your bark, pull smoke flavor out of your meat, and can turn your meat into pot roast if you leave it there too long.
You can go by temp as Brian describes above, but color is also an excellent guide as to when to foil. Get the color to where you want it before you foil, as it won't develop any more color once it's wrapped.
Keri C