This phrase refers to some collaboration that occurs easily and benefits all parties.
Wikipedia also suggests a biblical origin, though not a citation for the specific phrase.
Jews have held an ideal standard for Jewish family life that is manifested in the term shalom bayit. Shalom bayit signifies completeness, wholeness, and fulfillment… In Jewish culture, a marriage is described as a “match made in heaven,” and is treated as a holy enterprise.
But I’m pretty sure the first use wasn’t the 1977 movie A Match Made in Heaven