Let's talk about some adverbs of time and how Italians use them. Some adverbs of time have multiple meanings and need context to be understood and used precisely.
We can detect the noun notte (night) as part of the time adverb stanotte. The beginning, on the other hand, is sta, a short form of questa (this).
Non ti dispiace se rimango qui stanotte, vero?
You don't mind if I stay here tonight, do you?
Caption 4, Il Commissario Manara S1EP7 - Sogni di Vetro - Part 9
Play Caption
But sometimes, the same adverb stanotte refers to "last night."
E mio marito non è rientrato stanotte e non ha nemmeno avvertito...
And my husband didn't come home last night and he didn't even let me know...
Caption 16, Il Commissario Manara S1EP6 - Reazione a Catena - Part 2
Play Caption
We can use the same form to talk about the evening: stasera. Normally, we'd say that stasera means "this evening" but in English, we often use "tonight" when referring to the dinner hour, so sometimes "tonight" is the best translation.
La lista della spesa per la cena di stasera.
The shopping list for tonight's dinner.
Caption 2, Anna e Marika La mozzarella di bufala - La produzione e i tagli - Part 1
Play Caption
While we say things like "I'm going out tonight," Italians will choose stasera over stanotte, unless we are talking about something happening in the middle of the night. But let's remember that sera generally means "evening."
Ma', stasera esco. -Dove vai?
Mom, tonight I'm going out. -Where are you going?
Caption 53, Acqua in bocca Un amico per Pippo - Ep 1
Play Caption
Also, let's take the opportunity to remind ourselves that buonasera is a greeting upon arrival, whereas buonanotte is when you're leaving (and perhaps headed for bed).
You may already be familiar with the word for "yesterday." It's ieri. Just in case stanotte might not be clear enough, we have the choice of using ieri notte to mean "last night." If you are just getting up in the morning, you'll probably use stanotte to talk about the night before, but if it is later in the day, ieri notte makes sense.
Ieri notte tre ladri hanno pensato bene di svaligiare un atelier di abiti da sposa.
Last night, three thieves had the bright idea of cleaning out a wedding gown studio.
Caption 40, La Ladra EP. 2 - Viva le spose - Part 13
Play Caption
If we say ieri sera, we can translate it with either "last night" or "yesterday evening," depending on how we think of it. But sera is generally used until late, let's say, until bedtime, whenever that is.
E voi due ieri sera eravate in casa? Sì, stavamo guardando la televisione.
And you two last night were at home? Yes, we were watching television.
Captions 47-48, I Bastardi di Pizzofalcone EP4 Gelo - Part 2
Play Caption
We have said that ieri means "yesterday," but what about the day before yesterday?
One way to say this is l'altro ieri (the other yesterday).
Quando l'hai vista l'ultima volta? -L'altro ieri.
When did you last see her? -The day before yesterday.
Captions 5-6, I Bastardi di Pizzofalcone EP4 Gelo - Part 5
Play Caption
Some people invert the words and say ieri l'altro.
Of course, we can also say due giorni fa (2 days ago).
E quando l'hai vista l'ultima volta? -Due giorni fa.
And when did you see her last? -Two days ago.
Captions 50-51, I Bastardi di Pizzofalcone EP4 Gelo - Part 4
Play Caption
If we don't need to be precise, we can say "the other day."
No, scusa l'altro giorno non t'ho potuto richiamare, ma dovevi dirmi qualcosa di lavoro?
No, sorry, the other day I couldn't call you back, but did you have something about work to tell me?
Captions 29-30, Imma Tataranni Sostituto procuratore S1 EP1 L'estate del dito - Part 16
Play Caption
When we're referring to the past with these adverbs of time, we'll want to use the passato prossimo (which works like the present perfect) tense. The exception is when we use the verb essere (to be). In this case, we might also use the imperfetto.
Note that we don't say il giorno prima di ieri to correspond to "the day before yesterday!" But if that's all you can think of, people will understand. They'll probably say, "Oh, sì, l'altro ieri."