Some flowers like the sunflower are attracted to the sun because of a phenomenon known as "phototropism" which is a growth related response of a plant to stimulation by light. There is an hormone known as "auxin" that is present in the stem which stimulates the response. Auxins also encourage the lengthwise growth of plants.