This use of por is for simple phrases about the time of day. Think of this use as the best translation of ‘during’, such as ‘during the evening’.
English: I don’t like to work during the mornings.
Español: No me gusta trabajar por la mañana.
English: You have see the city at night. It’s incredible.
Español: Tienes que ver la ciudad por la noche. Es increíble.
English: I prefer to go out at night on Fridays.
Español: Yo prefiero salir por la noche de los viernes.