The word making is a present participle leading a participial construction (clause). You can Google it or look up the grammar book.
The verb make is broadly used with following constructions:
(1) Taking an (one) object only:
My mom made a dress. I made a robot.
It means to form something by putting parts together or combining substances.
(2) Taking an object with a prepositional complement:
I made grapes into fruit juice.
It means to alter something so that it forms something else. In the sentence, the prepositional complement into fruit juice indicates the thing (fruit juice) to which the object (grapes) was altered.
(3) Taking an object with an objective complement which is an adjective:
He made me angry. She makes me happy.
It means to cause to appear in a specific way (angry and happy in the example).
(4) Taking an object with an objective complement which is a noun.
21, Adele's second album, made her a very rich woman.
It also means the same as No. (3). The second album caused Adele to appear as a very rich woman. In other wards, Adele became a rich woman as a (successful) result of her second album.
(5) Now, your example (simplified):
The sunlight made the ocean a sea of sparkling stars.
It has the same grammatical construction as No. (4). The only difference is the object of to make is a person in No. (4) and a thing in No. (5)
The sunlight caused the ocean appear as (look like) a sea of sparkling
stars. In other words, a sea of sparkling stars appeared as a result of (due to) the sunlight.
The above examples are just four broadly used examples out of so many usages. As @medica explained in the other answer, a sea of sparkling stars is a metaphor.
[Oxford Online Dictionary]