Why present perfect in “When the night has come”?
Solution 1:
Let's look at a little more context:
When the night has come and the land is dark
And the moon is the only light we see
No, I won't be afraid, oh, I won't be afraid
Just as long as you stand, stand by me
A perfect construction marks a past action as having brought about a state which is relevant at some later point: the utterance’s ‘Reference time’.
In the utterance at hand, that Reference time is defined by the main clause—I won’t be afraid—as some sort of ‘future’. (It may be an actual temporal future, or a ‘consequential’ future; that doesn’t really matter.) This future is expressed using the present tense of will, so the state of night and darkness is expressed using present constructions: The night has come, the land is dark, the moon is the only light.
The perfect construction is employed in the first phrase to signify that night is not in the process of falling: it is not dusk, when light is fading, but already full night, when the light is gone. The state of night is fully realized.
When everything is dark I will not be afraid.