There are religions that are diametrically opposed to each other and no compromise will heal the rift (Christianity and satanism for e.g.). If there is common ground love can conquer difficulties.
Both spouses must have the same goal. If one believes in eternity and the other does not, then one will live for things of this earth while the other will fight for things beyond this life making daily struggles that much harder to overcome.
Personally, I am not married, but I search for someone who speaks the same language my heart speaks to its Creator. I love to sing with others and I would love to find a heart that would serenade God in harmony with me. Having the same beliefs as my husband would be key in choosing him.