Yes they did. And, TL;DR, their two uses were this (Beethoven) and this (Mozart)
Drums came in basically two forms. There was the timpani or ketteldrum, which had been popular in Europe since at least Henry VIII's time, and was a pretty regular feature of European orchestras since about the middle of the 17th century with the music of Purcell. In the late 18th century, timpani drums were essentially thought of as being a way of reinforcing the sound of brass instruments like horns. We can hear this especially in the Mozart excerpt above: every time loud trombones and horns play, they are accompanied by big hits in the timpani. In this sense, they really functioned (as weird as it seems) as a kind of brass instrument, rather than as their own independent instrument within the orchestra.
The other form were instruments like the bass and snare drum, which were much rarer and were essentially a "special effect." These were essentially appropriations of musical practices from the ottoman empire, what they called mehter and what Europeans called "janissary bands." Europeans had a huge fascination with this style of music, which was partially the result of renewed political relationships that formed between Europe and the ottoman Turks during the 17th and 18th centuries. Big diplomatic lavish visits by Turkish envoys were often accompanied by mehter ensembles, and Europeans soon created their own versions of janissary bands, though often populated by middle eastern and black-African musicians, which helped to maintain this kind of music as exotic that is, as weird, foreign, and a little sexy / dangerous. Turkish music always had a little bit of a sense of being "barbaric" to white Europeans. And as a result, the image of what this music meant was much more strongly etched in the minds of European audiences. Essentially, you don't really hear cymbals, snare drums, and bass drums in this period unless the composer is specifically trying to conjure the image of an exotic turkish military band. This is pretty much exactly what is going on in the Beethoven example (notice how the top of the score indicated "alla marcia," like a march).
What both of these uses share is a connection to what might be thought of as battle music, militarism, marches, etc. This is where horns and percussion instruments were actually used, and so when composers utilized them in the context of the theatre or the concert stage, they did so as a way of referencing those real-life situations. This can mean a variety of things. So, for instance, Bach uses timpani in the climactic finale to the gloria of his Mass in B minor, and the effect is, perhaps, one of spiritual victory or triumph, signified in no small part through military sounding instrumentation. But with the Janissary-style music, there was also always some sense of "pointing elsewhere," of saying "not only is this a military, but it is a strange, exotic one."
Sources:
Adler, Samuel. 2002. The Study of Orchestration. Third Edition. New York: Norton.
Meyer, Eve R. 1974. "Turquerie and Eighteenth Century Music," Eighteenth-Century Studies 7: 474–88.
Monelle, Raymond. 2006. The Musical Topic: Military, Hunt, Pastoral. Bloomington, IN: Indiana University Press.