Some sources I've found say around 1560, some around 1490 with the end of the reconquista, and some sources have Spain being around in the 1460s.
That is quite a question, but there is no clear answer.
Some may argue that modern Spain formed when Isabel and Fernando married in 1469, starting the period of collaboration between the crowns of Castile and Aragon. However, this excludes Navarre from the equation.
Others may argue that modern Spain started in 1517, when Charles I became King of both Castile and Aragon (considering that Aragon had already conquered Navarre and given it to Castile). However, I would argue against this, if we take into consideration the fact that both crowns still had different laws, different systems of government, and even different money.
1561 may be an answer, if we take into account that on that date Philip II established a fixed Court in Madrid, centralising the administration, but Aragon kept functioning on its own, even when governed from Madrid through the Council of Aragon.
Another answer, with which I tend to agree would be that modern Spain formed in 1714 after the Decretos de Nueva Planta, when Philip V decided that his kingdoms should have one legal system and only one monetary system, assimilating the domains of the Crown of Aragon to the same system of Castile.