It depends on what you call Spanish. As Spanish is basically one variant of vulgar Latin, people have never really stopped speaking Latin. It just evolved. Another important thing to notice is that most people in Spain up until recently didn't speak Spanish, but a large variety of dialects/languages: Galician, Catalan, Basque, Aragonese, Leonese, Andalusian, Asturian etc. All the aforementioned languages (with the exception of Basque) originate from vulgar Latin. The language that is now called Spanish by most people is actually just one of these dialects: Castilian (it was spoken in the region of Castile). This Region came to be the most important region politically and so its dialect became the standard language of the whole country. Visigothic and Moorish were never the main language of the Iberian people. Visigothic being solely the language of a small elite and Moorish not having a strong influence everywhere on the peninsula. In the Moorish areas people spoke Mozárabe a vulgar Latin language with a lot of Arabic influence. This Arabic influence is still apparent in modern Spanish, where there are words like alfiler, algodón, alcalde, alfombra etc. I hope this helped. I do not know to what extent Arabic/Moorish was really spoken, so I hope someone else can help you with that.
After the Reconquista. The territory that is Modern Day Spain consisted of many different kingdoms, but most notably the two most powerful were Aragon and Castile. When Ferdinand and Isabella married and combined the two crowns of Aragon and Castile, it marked the unification of the Spanish realm (for lack of a better term). The Fall of Granada in 1492 marked the last battle for control of the entire Spanish-speaking part of the peninsula for I&F, and then Jews were expelled by the Alhambra Decree the same year as well.
Isabella and Ferdinand began a period of converting Muslims to Christianity, and these converts would be known as "Moriscos". Moriscos would enjoy a period of freedom, but would end up being forcefully expelled from Spain much like their Jewish counterparts by Philip III in 1609.
From then on, most of Spain would remain fairly homogeneous. Almost everyone spoke a Spanish dialect (standard Spanish is actually the Castilian dialect) and Spain would stay almost entirely Roman Catholic. The dialects vary, especially ranging from Catalonian in the Northeast, to Andalusian in the far South. However, the marriage of Ferdinand and Isabella and their final victories over Muslim forces would ensure Castilian domination of Spain. After uniting the territory, the monarchs would go on to develop a united "Spanish Culture" especially after the conquest in the New World.
Sources:
Moriscos of Spain: Their Conversion and Expulsion (HC Lea, 1901)
Muslims in Spain, 1500 to 1614 (LP Harvey, 2005)
Alhambra Decree: 521 Years Later (March 29, 2013 by Francisco Macías, Library of Congress)
As a Spanish I'd comment that Spanish never seem to have felt Moors, although we refer to Moor Spain these days when talking about the Muslim rulers and elites of the time but continue to consider the plain people, this is farmers, artisans, shepherds, etc as Spanish, Christians in most cases (or inhabitants of Hispania if you wish) under Muslim rule. Now, is this a cultural view imposed by Spanish historians or politics and religion? Not sure on that one probably a bit of each. What transpires from Spanish textbooks it that the inhabitants of the Peninsula did not convert to Islam in general but this was the religion of the rulers, elites and those who came from North Africa under the auspicious of the new masters.