Solomon
Ecclesiastes 12:2ESV·traditional attribution

before the sun and the light and the moon and the stars are darkened and the clouds return after the rain,

Matthew Henry Presbyterian @wholebiblehenry

Here is, I. A call to young people to think of God, and mind their duty to him, when they are young: Remember now thy Creator in the days of thy youth. This is, 1. The royal preacher's application of his sermon concerning the vanity of the world and every thing in it.

Commenting on Ecclesiastes 12:1-7

John Gill Reformed Baptist @doctorgill

While the sun, or the light, or the moon, or the stars, be not darkened,.... The wise man proceeds to describe the infirmities of old age, and the troubles that attend it; in order to engage young men to regard God and religion, before these come upon them, which greatly unfit for his service.

Jamieson-Fausset-Brown Reformed @jfbcommentary

Illustrating "the evil days" (Jer 13:16). "Light," "sun," &c., express prosperity; "darkness," pain and calamity (Isa 13:10; Isa 30:26). clouds . . . after . . . rain--After rain sunshine (comfort) might be looked for, but only a brief glimpse of it is given, and the gloomy clouds (pains) return.