How does the Supreme Court play a role in determining the constitutional validity of same-sex marriages

The Supreme Court recently delivered a verdict on the constitutional validity of same-sex marriages. Describe the role and importance of the Supreme Court in this matter.