The Quran does not explicitly name 'the one who was to be sacrificed', though people have used some verses to make deductions about it. I personally find the arguments in favor of Ishmael to be more reasonable.
There are no clear and authentic hadith which solve the matter. Though one may come across some weak ones which favor Ishmael.
There are reports from the Sahabah (companions) and Tabieen (generation after the companions) that favor both views (Ishmael and Isaac), though my current impression after reading Tafsir Qurtubi is that the view favoring Isaac is more common.
The case for Ishmael:
Tafsir Al Qurtubi (seems to favor the view that Isaac was to be sacrificed, but fairly represents both views) says that those who favor Ishmael argue using this verse:
Quran 37:101 So We gave him good tidings of a forbearing boy.
Quran 37:102 And when he reached with him [the age of] exertion,
he said, "O my son, indeed I have seen in a dream that I [must]
sacrifice you, so see what you think." He said, "O my father, do as
you are commanded. You will find me, if Allah wills, of the
steadfast."
They say that the one who was to be sacrificed promised Abraham that he will be patient ... and the Quran itself says that Ishmael fulfilled his promise and was patient:
Quran 21:85 And [mention] Ishmael and Idrees and Dhul-Kifl; all
were of the patient.
Quran 19:54 And mention in the Book, Ishmael. Indeed, he was true
to his promise, and he was a messenger and a prophet.
Patience and Promise are not linked with Isaac in the Quran, and there isn't anything in the Islamic or Jewish tradition that mentions a major alternate event where these attributes were demonstrated by Ishmael. Qurtubi doesn't seem to offer a counter-argument here to this reasoning, though he might have mentioned something under the respective verses [If I find time I'll check and post it].
Further they argue:
Quran 37:112 And We gave him good tidings of Isaac, a prophet
from among the righteous.
Quran 11:71 And his Wife was standing, and she smiled. Then We
gave her good tidings of Isaac and after Isaac, Jacob.
The argument presented is that before Isaac was born, his birth was announced by God, and he was foretold to be a Prophet, and it was foretold that he would have a son named Jacob. If God was to command Abraham to slaughter Isaac as a child then that would go against His previous Word.
Qurtubi argues that there are alternate explanations that may resolve this. It could have been that the promise of Prophethood was made after the birth and sacrifice saga. And regarding Jacob it could have been that either the sacrifice saga occured after Jacob's birth, or that it isn't necessarily implied in the Prophecy that Jacob was to be a descendant of Isaac.
Qurtubi mentions the Sahabah and Tabieen who held the view that Ishmael was to be sacrificed:
Below is my personal translation from [ Tafsir Al Qurtubi , bottom page 1 , page 2 ], the portions in [brackets] are my own comments.
A second group of people said: Ishmael was sacrificed for Allah. Those
who said this include Abu Hurairah and Abu Tufail ‘Amr ibn Wathila.
The same is also narrated from Umar and Ibn Abbas. The Tabieen from
whom this is narrated include Saeed bin Musaib, Shabi, Yusuf bin
Mehran, Mujahid, Rabi bin Ans, Muhammad bin Ka'ab, Qurzi, Kalbi and
Alqamah.
When Abu Saeed bin Zarir was asked about who was sacrificed for
Allah, he said in poetry: " No doubt that the one sacrificed was
Ishmael. The Book and Sunnah is agreed with that. This is a special
previlage that was specified by Allah for our Prophet. Tafsir and
Tawil were about this, if you are from the Prophet's Ummah then don't
deny the previlage that was granted specially to him"
Asmi said: When I asked Abu Umar ... about the one sacrificied, he
said: "What has happened to your intelligence? When was Isaac in
Mecca? It was Ishmael who was in Mecca, he was the one built the House
of Allah [Kaabah] with his father, and the place of sacrifice is in
Mecca. It is narrated from the Prophet that the one sacrificed was
Ishmael".
An important point made above is that the greater Pilgriage (Hajj) involves rituals linked with Ishmael, e.g. the Tawaf of the Kaabah (built by Ishmael), the Saye between Safa and Marwah (actions of Hagar, mother of Ishmael) ... the stoning and sacrifice are also done in Mecca and it only makes sense that they would be regarding Ishmael since Isaac was never said to be in Mecca.
The case for Isaac:
Qurtubi mentions that the verse used to support this view is:
Quran 37:101 So We gave him good tidings of a forbearing boy.
[Regarding the one who was to be sacrificed]
With 37:101 being unclear, the only other place where good tidings or indeed any prophecy of "a child of Abraham" is mentioned in the Quran seems to be in clear reference to Isaac:
Quran 37:112 And We gave him good tidings of Isaac, a prophet
from among the righteous.
Quran 11:70 And his Wife was standing, and she smiled. Then We gave
her good tidings of Isaac and after Isaac, Jacob.
Qurtubi attributes the view that 'Isaac was the one to be sacrificed' to several Sahabah and Tabieen, and he notes that this is the stronger tradtion:
Below is my personal translation from [ Tafsir Al Qurtubi , page 1 ], the portions in [brackets] are my own comments.
The Ulema differed about the one who was commanded to be sacrificied. Many
have the opinion that it refers to Isaac. The ones who stated this
include Abbas bin Abdul Mutalib. His son was Abdullah, and this is the
Saheeh [authentic] narration from Abdullah. Thauri and Ibn Jarij
attribute to Ibn Abbas: "Zabih Ullah [Title: Sacrificied for Allah]
was Isaac". The same is attributed to Abdullah bin Masud; a person
asked him about the most honourable person on which Abdullah
responded: "He is Joseph son of Jacob son of Isaac Zabi-Ullah [Title:
Sacrificied for Allah] son of Abraham Khalil-Ullah [Title: Friend of
Allah)]." [this is in relation to a report by] Hammad bin Zayed
narrated from the Prophet: "Al-Karim son of Al-Karim son of Al-Karim
son of Al-Karim ... Joseph son of Jacob son of Isaac son of Abraham"
[Hadith is also Saheeh Bukhari].
Abu Zubair narrates from Jabir that Isaac is the one sacrificied for
Allah. The same is also narrated from Ali ibn Abi Talib.. It is
also narrated from Abdullah bin Umar that Isaac was sacrificied for
Allah. Umar also said the same. These are seven Sahabah. Tabieen and
others also narrated the same, which include Alqah, Shabi, Mujahid,
Saeed bin Jabeer, Ka'ab Ala Habar, Qatadah, Musruq, Ikramah, Qasim bin
Abi Bazha, Ata, Mutaqil, Abdul Rahman bin Basit, Zuhri, Sa'di,
Abdullah bin Huzail and Imam Malik bin Anas, they all said that
Zabi-Ullah is Isaac. The same is the view of the People of the Book,
the Jews and the Christians. Many people adopted this same view, these
include Nihas, Tibri and others.