Hi. I need help in writing a metaphor for the sun so I was wondering if you can help me out.
Sure, we can help you out.
Start with the foundation: what is your task? Specifically, what is a metaphor?
A metaphor is a figure of speech that creates a link between two things through using a image that is not literally true. So in Sonnet 18, Shakespeare used the metaphor "eye of heaven" to refer to the sun. That's not literally true: the sun isn't literally an eye, nor is it literally part of a spiritual heaven. However, it is shaped like an eye, and shines down on us like divine sight, so the metaphor works.
Your job would be to think about which qualities of the sun you want to apply in your metaphor. The sun is large, it is hot, it dominates the sky, it is the center of the solar system, and it appears to go around the earth. It has qualities that we know through science, but that aren't obvious, like the earth going around it, or the fact that it is a star but not a particularly large or hot star.
So...what do you want to link it with? Family? Who shines brightest in your family? Mother sun warming them all? Love? Love shines, can blind you, but is at times invisible.
Pick your qualities and what you want to link, and you'll have your metaphor.