You will need to explain a bit better, a vector can be described as a diference between 2 points A-B => C
C will be your direction
So if you want to get the sun direction you need to assume that you SUN is at some position, lets call it
SunPos = Vector(0,0,0);
To get direction from the sun to whatever surface you are , just do
Direction = CurrentPoint - SunPosition
Unless I am not understanding what you are saying.
To simulate the Sun movement just make the Sun position Change based on Cos and Sin function, this will simulate the sun position across the earth and calculate the direction based on that position.
SunPos = Vector(Cos(time),Sin(Time);
This for 2D, if 3D you need to decide which axes is the sun moving, but the principle is the same.
Hope this helps.