In general the authors of the paper can choose among themselves who should give the talk, but having a few simple rules can help save an awkward discussion and hurt feelings.
By default I like to have the youngest author give the talk, youngest by academic age (years since Ph.D). Academic age is both negative and estimated for grad students but the rule still applies. Young people can use the talk practice and the exposure and giving the talk forces them to attend the conference where they can interact with a broader community.
If the youngest author cannot attend the conference (and it should be a very good reason) then move up the chain. If none of the authors can attend the conference, which should only happen in emergency situations, then the authors need to find someone else to give the talk. Authors should not submit to a conference unless one of them is willing to present the paper if it is accepted.
Some exceptions: An author looking for a job gets priority. If an author is already giving a different talk at the same conference then best to spread the wealth around. Sometimes it just makes sense for a specific author to give that talk based on the role they played in the paper.
Of course following these rules mean I haven't given a regular STOC/FOCS talk since 1992 but that's life.