The most important factor was simply that, by time Qin Shihuang (born Zhao Zheng) took the throne of Qin in 246 BC it was already in an absolutely dominant position in China. Qin Shihuang's conquests were the culmination of almost five centuries of development, reform and expansion for the Qin state. I see three distinct stages of Qin's rise: first the era of initial development which culminated in the 6th-century BC hegemony of Duke Mu; a second stage of Legalist reorganization under Shang Yang in the mid-late 4th century BC; and finally an era of explosive military expansion during the long reign of King Zhaoxiang in the 3rd century BC. The Confucian-Legalist State: A New Theory of Chinese History by Dingxin Zhao is my main reference for this argument, besides the primary source Shiji and some general works by Mark Edward Lewis and Li Feng.
Qin was originally a small border fief near the Western Zhou heartland of the Wei River valley (also known as Guanzhong, in the southern part of modern Shaanxi province). This area was large and fertile enough to support a substantial population and was bounded on four sides by defensible passes, making it a strategically valuable area. But when this Western Zhou capital region was overrun by rebels and non-Chinese migrants in the 8th century BC, the Zhou state abandoned the region and resettled in their secondary eastern capital, called Chengzhou or Luoyi (modern Luoyang, Henan province). Over the next two centuries, Qin gradually gained control over the Wei River valley and surrounding highlands, pacifying the tribes and restoring Chinese feudal rule in the area. In the late 7th century BC, under the rule of Duke Mu, Qin was ranked as the second-strongest state in China, and according to some accounts Duke Mu was declared hegemon for a time. However, despite Qin's resources and strategic position, it stayed in the shadow of the even stronger state of Jin, which ruled the lands directly east of Qin and blocked them from engaging with the smaller states further east. In the 6th century BC, as the southern states of Chu and Wu gained in power, Qin's relative status again declined and by the start of the Warring States period, they were just a middling power. Still, this was the period when Qin established its social and economic base and its advantageous location.
The second stage, starting in the mid-4th century BC during the reign of Duke Xiao, marked Qin's "modernization" along Legalist lines, Qin's first significant victories against its eastern neighbors, and the assumption of the higher title "King" by its rulers. Duke Xiao recruited Shang Yang, then a minor official in the state of Wei, to reform the Qin state in accordance with the most up-to-date practices of the other states and with Shang's personal philosophy of government, Legalism. Shang assaulted the feudal social order in Qin, privatizing land, reducing hereditary privileges, and enacting a draconian law code that subjected nobles and commoners alike to harsh punishments. He also greatly improved the state's power to collect taxes and levy soldiers, created meritocratic army ranks and a centralized administrative bureaucracy, and moved the government from the traditional upland capital Yong to a new site in the heart of the Wei River valley- Xianyang. Unfortunately for Shang Yang, Duke Xiao's successor King Huiwen harbored a grudge against him and had him pulled apart by chariots shortly after gaining the throne; still, King Huiwen saw how Shang's reforms had strengthened Qin, and he kept the Legalist policies in place while using the state's new muscle to wage repeated wars against his eastern neighbors. Qin now had the efficient military and administrative machine it needed to contend with the other Warring States.
King Huiwen's death was followed by a messy interregnum, but eventually King Zhaoxiang acceded to the throne. Over the course of his long reign, he would greatly expand Qin's borders and break the power of its strongest rivals. This was partly achieved through cunning diplomacy- although the other states could and did defeat Qin when they cooperated with each other, the lack of trust between them made it easy for Qin's agents to sow distrust within alliances or to entice members to defect to Qin's side. Regular wars between them also presented ample opportunity for Qin to gnaw away at whoever was on the losing side at the time. Qin crushed an allied army at Yique in 293 BC; they seized the capital region of Chu in 278 BC; they annihilated the Zhao army at Changping in 260 BC. By the time King Zhaoxiang died in 251 BC, Qin had expanded dramatically, and the rival Warring States had been greatly weakened by loss of territory and by heavy casualties. This was the third and final step in setting the stage for the unification of China under Zhaoxiang's great-grandson, Qin Shihuang.
Why it was Qin and not one of the other states is a more challenging question. Qin really had two concrete advantages; one, they reformed more deeply and more thoroughly than many of their rivals, and two, their defensible position enabled them to fight along one front at a time and confidently put their full strength into the offensive. In contrast, Chu was a large and populous state, but its powerful hereditary elites successfully resisted centralizing reforms and that meant it punched well below its weight in terms of military power; Wei was an early and vigorous adopter of reforms and initially a formidable power, but its central location was vulnerable to attack from multiple directions and their strength was often split or worn down in a succession of campaigns (i.e. when they invaded Han, they were attacked in turn by Qi). Both were potential rivals to Qin but both were ultimately defeated.