The sun plays a critical role in Camus' The Stranger. It has importance as an integral part the setting. It has importance as a prime motivator of Meursault's behaviors--one can't really only say "choices" with great difficulty in relation to Meursault. More importantly, the sun plays a critical role as a symbol.
The sun dominates the narrative as Meursault's life is laid open to light. For one thing, events occur on Sunday, the day devoted in ancient times to honoring the Sun god. For another thing, the condition of the sun elicits a corresponding physical sensation in and, sometimes also, reaction from Meursault.
the waiter was sweeping up the sawdust in the empty restaurant. A typical Sunday afternoon. ...
It occurred to me that ... I’d got through another Sunday, that ... nothing in my life had changed.
The sun had risen a little higher and was beginning to warm my feet.
I was surprised to see how quickly the sun was climbing up the sky, ... the air had been throbbing ... . I tried to fan myself with my handkerchief.
It might be said that that these responses might all be the referents of the metaphor of his being "sunburned":
cool night air flowing over ... sunburned bodies.
In addition, the sun is "scorching hot" and associated symbolically with "a din of chains and backfires" that represent the profound and, it might be said, tyrannical effect the sun has on him.
The sun performs many functions upon Meursault. It
- comforts him: "warm my feet"
- gives him sleep: "warmth of ... the sun, I felt myself dropping off to sleep"
- reveals: "The sun glinted on Raymond’s revolver"
- antagonizes: "the glare of the morning sun hit me in the eyes like a clenched fist."
- compels: "[The sun] pressed itself on me, trying to check my progress"
- gives pain: "I felt a hot blast strike my forehead"
- drives him to murder:
[I was] conscious only of the cymbals of the sun clashing on my skull, and,... the keen blade of light flashing up from the knife, scarring my eyelashes, and gouging into my eyeballs.
Then everything began to reel before my eyes, a fiery gust came from the sea, while the sky cracked in two, from end to end, and a great sheet of flame poured down through the rift. ... I tried to explain that it was because of the sun.
These factors, when added to the factor that the sun dominates Meursault's perceptions and his point of orientation, indicate that the sun symbolizes the inherent absurdity of the universe and of life. The sun comforts, torments, pains, compels, and mercilessly drives the very man it gives restful sleep to. This is absurdity--structure without order, without reason, without meaning--dramatically resonating in an inescapable presence: the sun.