The Supreme Court announced on Friday that it would enter the national debate over same-sex marriage, agreeing to hear a pair of cases challenging state and federal laws that define marriage to include only unions of a man and a woman.