Tonight is an adverb of time indicating when something happens (e.g., 'I'll sleep tonight'). Adverbs of time answer 'when' questions. It can function as a noun in some contexts ('tonight's show'), but adverb is its primary classification in part-of-speech exercises.