The day is over, which means it's time to sum up some results. Most likely, the person spent the day unconsciously, wasted it without benefit, or made a lot of people unpleasant. In the evening, all the memories emerge from the routine, and it becomes sad from everything that has been done, which today cannot be returned and redone.
I will try to answer from the point of view of physiology, for which I will grab the minuses, but I hope that representatives of this science will also answer in more detail and accurately. In my opinion, this is due to the hormone melatonin, its secretion is related to the amount of light, the less it is, the stronger the secretion of melatonin, since one of the functions is to regulate sleep / wakefulness. But an increased content of this hormone can inhibit the secretion of gonadotropic hormones, which, in turn, are the main ones in the regulation of the gonads. As a result, a decrease in the concentration of sex hormones can affect mood, in a negative way, causing that very sadness.
I can assume that in the evening people are far from all the everyday hustle and bustle and routine, they just have no time to think about any other things, except for the vital ones that are necessary here and now (study, work, urgent trip to the store, etc. .). and when evening comes, people return home and begin (not) consciously to analyze the past day, and there they no longer notice how they begin to stir up memories of days gone by, and from there, perhaps, sadness and melancholy, sometimes nostalgia appears