Were they executed because they were one of the first cases or how many others were executed? I just watched Bridge of Spies and was wondering if James Britt Donovan changed the way that spies were sentenced
Yes, the Rosenbergs were the first and only Soviet spies in the US to be executed. The US has executed very few people for espionage: the only other example I can think of is Operation Pastorius, the eight German agents convicted by military tribunal and sentenced to death during the Second World War; six of them were executed.
Espionage is a capital crime, but it's relatively rare for the Department of Justice to pursue the death penalty — partly because the law governing capital punishment for espionage is complex and prone to change, and seeking the death penalty adds a new level of complexity to a prosecution. The relevant section of the Espionage Act (18 U.S. Code § 794) currently permits the death penalty for espionage only in specific circumstances, if:
the jury or, if there is no jury, the court, further finds that the offense resulted in the identification by a foreign power [...] of an individual acting as an agent of the United States and consequently in the death of that individual, or directly concerned nuclear weaponry, military spacecraft or satellites, early warning systems, or other means of defense or retaliation against large-scale attack; war plans; communications intelligence or cryptographic information; or any other major weapons system or major element of defense strategy.
Some changes in federal death penalty laws have been prompted in part by espionage cases. The section above relating to espionage offences that result in the deaths of US agents abroad was included in the 1994 Violent Crime Control and Law Enforcement Act (Title VI, the Federal Death Penalty Act) in part because of the scandal surrounding CIA counterintelligence officer and Soviet mole Aldrich Ames, who was charged in February 1994 with having spied for the USSR since 1985. Ames is believed to have compromised scores of CIA agents, at least ten of whom were subsequently executed.
The threat of the death penalty can, however, be a useful bargaining chip/coercive tool for prosecutors: in one high-profile case (that's admittedly outside /r/AskHistorians' 20-year rule), the 2001 prosecution of FBI counterintelligence agent and Soviet spy Robert Hanssen, the government declined to seek the death penalty as part of Hanssen's plea bargain.
I haven't seen Bridge of Spies yet, so I'm not sure how these issues are portrayed in the film. The Abel case was unusual in some regards because the defendant was a foreign national; a KGB officer rather than an intelligence asset. Donovan did indeed urge a federal judge at Abel's trial not to impose the death penalty, but that appeal was made on tactical, rather than legal grounds; the idea that, by not executing Abel he could be a useful resource in future espionage cases or prisoner exchanges. The Powers-Abel swap in February 1962 was the first 'spy swap', but they weren't particularly common.
Ultimately, I think it's more likely that the Abel precedent changed how US intelligence pursued and the Department of Justice prosecuted accused spies, rather than how the judiciary sentenced them. But it's hard to say exactly how significant an impact it actually had.
Prosecuting intelligence cases was always a delicate operation; intelligence agencies had long been acutely aware that leaving an agent in place and using them to map enemy intelligence networks or feed disinformation back to their handlers could be a more effective tactic than simply taking them off the board. Espionage prosecutions in open court could also force counterintelligence services to disclose rather more than they would like about their sources and methods. There were instances, for example, where potential prosecutions of Soviet agents were not pursued by the American authorities because charging the suspects would have forced them to disclose the existence of the Venona project, and the NSA's decryption of more than 3,000 Soviet intelligence cables.