There are two literary devices found throughout this quote. Golding employs personification to describe the way that the sun beat down upon the island. Personification is when a non-human thing, object, or idea is given human attributes. The sun is given the human attribute of "gazing." The sun is an inanimate object that cannot look, see, or view anything. The aforementioned phrase also includes a simile. A simile is a comparison using the words "like" or "as." Golding compares the way the sun shines and radiates heat, to that of an "angry eye." Golding's use of both personification and similes builds imagery and establishes the mood and tone of the scene. The reader can imagine the scorching heat and overwhelming brightness that the sun radiates onto the island. By comparing the sun to an "angry eye," Golding conveys how the menacing rays are viewed negatively by the boys. The heat from the sun was so extreme that boys began to see mirages on the surface of the island and remained in the shade most of the day.
In addition to personification of the sun, this type of figurative language is also anthropomorphism (attribution of human characteristics to a non-human object, such as a force of nature). It is, further, a simile (direct comparison of two objects using the word "like" or "as").
The literary term used is personification. Personification occurs when any non-human thing takes on the qualities of a human or "person." This example shows the sun gazing down. The sun doesn't really have eyes like we do to gaze. It also doesn't have emotions like we do to feel "angry." So the sun is being personified here in this quotation. It gives the reader the feeling that the sun is unrelenting and harsh. It must be very hot and the sun's intensity is quite high.