Actually, plants don't 'know' where the sun is, they happen to grow towards the sun because sunlight slows the production of a certain growth hormone, resulting in the darkened side growing more than the illuminated side. End result, plant faces sunlight. The only problem is, what happens when the plant is dead-on?