All vehicles have at least one rear light. Motor cars and trucks have even two.
They ensure visibility in the dark and in bad visibility conditions, like fog or rain.
Red lights serve as an orientation for the cars driving behind you.
They relatively exactly estimate dimensions and car position in front of you. Rear lights also serve for orientation when car moves in reverse, but their visibility is limited.