Unified Field Theory
There's a whole lot of excellent points made here that I agree with. Perhaps I was a bit over-definitive when I said that it's *all* in the arrangement. Even with the perfect arrangement sent down from God's mind to your ears, there's still other factors like those mentioned that need to be attended to.
Please excuse my indulgance in trying to tie all these factors into a single theme (There's nothing on TV right now and I'm wide awake

)
Perhaps it would be better for me to say that IMHO the arrangement is the skeleton or blueprint onto which all the other techniques should be overlaid. The more parts/instruments one adds to a mix, the more sharply defined the role of each instrument should be. As Lee so aptly put it, each instrument should have it's own sonic space or purpose. This can be done - based upon the intended arrangement - in the four dimensions of sonic space; frequency, frequency, pan, depth, and drama.
This is especially true when combining rock/pop guitar with rock/pop synth. While synth can go anywhere in the spectrum and fill any role, often times one finds guitar and synth competing for similar turf in both frequency spectrum and musical purpose.
FREQUENCY
As pikingrin first mentioned, EQ is important in defining the guitar and and synth differently. I'd recommend using two approaches.
First, make room for the synth inside the guitar. The guitar has harmonics and resonances all over the place, usually more than your typical synth patch. This can tend to crowd out the synth. Not all of those guitar resonances are necessarily needed or even good. USe the oft-mentioned-here parametric EQ sweep to ID those frequencies in the git that jump out and honk at you, and then cut them down to size with some narroq-Q cuts. This will serve not only to make your guitar sound "sweeter", but it will clear some room for the synth to fit through.
Second, consider both the arrangement and the overal timbre and feel of each instrument. Does the sound of the git seem to be the most attractive to the arrangement in the higher registers and the synth in the lower, or vice versa? Or is the synth purposed for a narrow band and the git for more broad coverage? Whatever it may be, use some (not much) differentail EQ to each track to emphasize their strong spectral suits and demphisize their week ones for each instrument track.
PAN
What you do here is also defined on a basic level by the arrangement. Is the synth doubling a guitar (this can be a very powerful effect which I love)? Or do they have seperate rhythm/accompaniment and lead parts? Or are they serving complimentary melody/harmony roles?
If they are doubling, stacking their pan can be very effective for a great fat or punchy sound. Use of the differential EQ mentioned above is key to a great doubled sound here, IMHO. Hard L/R panning can also be employed here, but I personally don't find that as attractive as hard-panned guitar doubling, and for a synth/guitar double, I personally like the stacking better. YMMV.
If the synths and gits have seperate roles in the rhythm/lead/accompaniment realm of arrangement, then I'd personally fall back upon the old "find the spectral balance in the pan staging" rule. In other words don't thorw a synth and a guitar that sound spectrally similar (even after EQing) too near each other on the pan stage, and usually not on the same side of center, if it can be helped. Have an equal balance of lows and highs on eackh side of center.
ETC.
You probably get the idea by now. Continue with the depth dimenison using volume and reverb, setting the instrument depth on the soundstage, as well as the dynamic mixing (drama) throughout the song based upon the purpose of each instrument as defined within the arrangement.
Thank you - and apologies - for the long post indulgence. Hope it helps some.
G.