Rotating light - problem with axes

In my scene, I have a directional light which rotates based on a value (0f-1f). When that value is zero, I want the directional light to be pointed downwards, so I rotated the light to (90,0,0). After this it doesn’t matter how I try to rotate, it never goes the direction I want.

Actually, I’m so confused right now, I don’t even know how to explain my problem. It’s best to compare it to the sun. When the variable is 0f it’s noon; the light comes straight down. When the variable is 1f it’s midnight; the light goes straight up.
The lightobject should rotate around it’s own axes, not around another object.

how to do this?

EDIT

No idea if it’s of any importance, but when I let the light start with a rotation of 270 degree at the Y axis and I use:

transform.eulerAngles = new Vector3(Value*360 ,270, 0); 

that works the way it should. :s

Sounds like gimbal lock.

Use transform.rotation = Quaternion.Euler( x, y, z ) instead.

Try:

 transform.rotation = Quaternion.Euler(90,0,0) * Quaternion.Euler(0,0, Value*360);

I found this works well.

Quaternion rotation = 
    Quaternion.AngleAxis (  
        (_RotationValue * 180.0f) + 90.0f, 
        new Vector3(1, 0, 0)
        );

transform.rotation = rotation;

I hope this helps. =P