We all know the drill, your drummer comes up with an awesome loop and fill for a song however it doesn't work too well with the also awesome riff that you came up with. Sometimes all the solution is is a small change of tempo, because most drum loops can go to almost any song. Or maybe you can slightly move around the solos and fills for each, because it really doesn't sound all to good when two solos are going on at once. Give each other your chances to shine.
Remember the drums do not have to be just a small footnote to a great riff, a shining example of this is Iron Man, or almost any other Black Sabbath song. The drummer almost always did his own thing in every song while the guitarist busted out the chorus riffs and solos, however remember that you should never mix a drum solo and a guitar solo together, however you can have one or two of each in one song.
However there are some songs in which either drums or guitar just have to be dominate because one or the other is truly groundbreaking. A perfect example of guitar heavy songs are songs such as Sunshine Of Your Love by Cream, Above Me by Ruifo and Stairway To Heaven by Led Zeppelin. However the best example by far that I can think of is Smoke On The Water by Deep Purple, during the famous riff all the drummer is really doing is riding on the hi hats.
Although not as common but definitely should not be frowned upon are songs that chiefly driven by the drums. There are hardly any songs that are totally run by drums, however there are some songs in which the guitars are considered an after thought or are below average so the song must be carried on the back of the drummer. Many people may disagree with me but I believe that My Sherona by The Knack is mainly driven by the drums. Many songs by the band A Static Lullaby are mainly driven by drums. Also almost any hip-hop song is driven mainly by drums.
In conclusion in order to make a truly unique and great sounding song, both drums and guitar should be taken very seriously, and by the influence of Black Sabbath they don't exactly have to mix, each of you should just do your own thing.
Note: I am a drummer and I apologize if I speak too much from a drummer's point of view. And I am writing under the notion that you are a guitarist.