The longer path length of sunlight near the horizon during these times scatters shorter wavelengths, leaving predominantly longer red wavelengths to reach our eyes.