Arabic influence on the Spanish language overwhelmingly dates from the Muslim rule in the Iberian Peninsula between 711 and 1492. The influence results mainly from the large number of Arabic loanwords and derivations in Spanish, plus a few other less obvious effects.
The Spanish language, also called Castilian, is a Romance language that evolved from the dialects of Roman Vulgar Latin spoken in the Iberian peninsula. The first documents written in a language with some features specific of modern Spanish are ascribed to a number of documents from different monasteries in the area of Burgos and La Rioja in what is now northern Spain. However, Toledo in central Spain, which became the capital of the early Kingdom of Castile during its southward expansion, is where Spanish began to appear in written form in a form recognizable today. The pre-existing Mozarabic dialect of this region (i.e. the one present during muslim rule) is therefore likely to have also had an important formative influence on modern Spanish.
The lexical influence of Arabic reached its greatest level during the Christian Reconquista, when the emerging Kingdom of Castile conquered large territories from Moorish rulers particularly in the 11th, 12th and 13th centuries. These territories, which included the former Taifa of Toledo, had large numbers of speakers of Arabic, as well as many who spoke local Romance dialects (Mozarabic language) that were heavily influenced by Arabic, both influencing Castilian. It's possible that Arabic words and their derivatives had also been priorly brought into Castilian by Mozarab Christians who emigrated northwards from Al Andalus in times of sectarian violence, particularly during the times of Almohad and Almoravid rule in the 12th and 13th centuries. As such, Arabic can be considered to have had a formative influence on the Spanish language.