When referring to an action, it means doing that act soley for the Pleasure of Allaah and not seeking any fame or praise from the people. It could also be an act that requires great personal sacrifice, but because of one's love for Allaah, that personal sacrifice is not too difficult.
When you love another person for the Sake of Allaah, it means you love someone because they are obedient to Allaah and because it may be that Allaah loves that person. You love that person for His sake, not because of that person's money, family, lineage, personal favors, physical appearance, nationality, or any other materialistic reason.
Getting married for the Sake of Allaah could refer to someone getting married because they really want to be a better Muslim (and not just getting married for status or money or physical pleasure). In Islaamic marriage, love is a condition (note: I am not referring to lust and dating in Islaam is not allowed). A person cannot be forced into marriage with someone they don't want to marry.
So doing something for the Sake of Allaah puts emphasis on the act being done seeking Allaah's Pleasure and not for lowly, trivial reasons.