He is generally said to have been a pupil of Carissimi in Rome, and there is reason to suppose that he had some connexion with northern Italy, since his early works show the influence of Stradella and Legrenzi. The production at Rome of his opera Gli Equivoci nell’amore (1679) gained him the protection of Queen Christina of Sweden (at the time residing in Rome), and he became her Maestro di Cappella. In February 1684 he became Maestro di Cappella to the viceroy of Naples, through the intrigues of his sister, an opera singer, who was the mistress of an influential noble in that city. Here he produced a long series of operas, remarkable chiefly for their fluency, as well as other music for state occasions. In 1702 he left Naples and did not return until the Spanish domination had been superseded by that of the Austrians. In the interval he enjoyed the patronage of Ferdinand III of Tuscany, for whose private theatre near Florence he composed operas, and of Cardinal Ottoboni, who made him his Maestro di Cappella, and procured him a similar post at the church of Santa Maria Maggiore in Rome (1703).
After visiting Venice and Urbino in 1707, he took up his duties at Naples again in 1708, and remained there until 1717. By this time Naples seems to have become tired of his music; the Romans, however, appreciated it better, and it was at the Teatro Capranica in Rome that he produced some of his finest operas (Telemaco, 1718; Marco Attilio Regoló, 1719; Griselda, 1721), as well as some noble specimens of church music, including a mass for chorus and orchestra, composed in honor of St Cecilia for Cardinal Acquaviva in 1721.
Scarlatti’s music forms the most important link between the tentative “new music” of the 17th century and the classical school of the 18th, which culminated in Mozart. His early operas (Gli Equivoci nel sembiante (1679); L’Honestà negli amori (1680); Pompeo (1683), containing the well-known airs “O cessate di piagarmi” and “Toglietemi la vita ancor,” and others down to about 1685) retain the older cadences in their recitatives, and a considerable variety of neatly constructed forms in their charming little arias, accompanied sometimes by the string quartet, treated with ‘careful elaboration, sometimes by the harpsichord alone.
By 1686 he had definitely established the "Italian overture" form (second edition of Dal male il bene), and had abandoned the ground bass and the binary air in two stanzas in favour of the ternary or da capo type of air.
His best operas of this period are La Rosaura (1690, printed by the Gesellschaft für Musikforschung), and Pirro e Demetrio (1694), in which occur the songs “Rugiadose, odorose,” Ben ti sta, traditor.”
From about 1697 onwards (La Caduta del decemviri), influenced partly perhaps by the style of Bononcini and probably more by the taste of the viceregal court, his opera songs become more conventional and commonplace in rhythm, while his scoring is hasty and crude, yet not without brilliancy (Eracles, 1700), the oboes and trumpets being frequently used, and the violins often playing in unison. The operas composed for Ferdinand de Medici are lost; they would probably have given us a more favourable idea of his style, his correspondence with the prince showing that they were composed with a very sincere sense of inspiration.
Mitridate Eupatore, composed for Venice in 1707, contains music far in advance of anything that Scarlatti had written for Naples, both in technique and in intellectual power. The later Neapolitan operas (L'Amor volubile e tiranno (1700); La Principessa fedele (1712); Tigrane, 1715, &c.) are showy and effective rather than profoundly emotional; the instrumentation marks a great advance on previous work, since the main duty of accompanying the voice is thrown upon the string quartet, the harpsichord being reserved exclusively for the noisy instrumental ritornelli.
His last group of operas, composed for Rome, exhibit a deeper poetic feeling, a broad and dignified style of melody, a strong dramatic sense, especially in accompanied recitatives, a device which he himself had been the first to use as early as 1686 (Olimpia vendicata) and a much more modern style of orchestration, the horns appearing for the first time, and being treated with striking effect. Besides the operas, oratorios (Agar et Ismaele esiliati, 1684; Christmas Oratorio, c. 1705; S. Filippo Neri, 1714; and others) and serenatas, which all exhibit a similar style, Scarlatti composed upwards of five hundred chamber-cantatas for a solo voice. These represent the most intellectual type of chamber-music of their period, and it is to be regretted that they have remained almost entirely in manuscript, since a careful study of them is indispensable to any one who wishes to form an adequate idea of Scarlatti's development.
His few remaining masses (the story of his having composed two hundred is hardly credible) and church music in general are comparatively unimportant, except the great St Cecilia Mass (1721), which is one of the first attempts at the style which reached its height in the great masses of Johann Sebastian Bach and Beethoven. His instrumental music, though not without interest, is curiously antiquated as compared with his vocal works.