In my office I often do microdermabrasion directly before an IPL, especially on people with stubborn areas of browns. It's fine to do the treatments the same day (as long as a peel isn't applied), or you can stagger them a few weeks apart like you're suggesting.
Sun exposure absolutely affects IPL. The IPL is trying to get rid of sun and age spots, discolorations, uneven tones and textures, etc. - all caused by the sun. If you go into the sun a lot, or worse, tan!, the effects will be minimal, at best, because you are continuing to cause harm to your...