The California Supreme Court decided Thursday that the sponsors of Proposition 8 and other ballot measures are entitled to defend them in court when the state refuses to do so, a ruling likely to spur federal courts to decide the constitutionality of same-sex marriage bans.