just my impression, but are you sure that you are not over-complicating things?
Why invert the sine function at all, when you have the argument you have passed to it? That's precisely the value you are looking for, in your quest for trigonometric functions inversion...
Just either cache the sin argument somewhere before applying the function to it, or just re-create the argument. Convert it to degrees, and you are set.
Keep in mind the DRY principle: the
sin result is useful to get right things like "ambient light" values, or to feed, for instance, a proper value to NPC agents, but it's just a derivative value. The proper authoritative source for the time of the day in your game, is still the double/int/whatever variable where you keep track of your game cycles/wall time, and as long as you have it, you can get from it all kind of different time manifestations, whether is -1/+1 for day/night, or something as complex as a quaternion keeping track of true ephemeral for the sun position.
Hope this helps!
UPDATE Cursory explanation of the algorithm behind time/rotation/sin, as requested in the comments.
Suppose you start with the
game time, that is, the number of seconds within your simulation.
The sine function you use is just a mathematical construct (one of many actually) that turns your linear, ever increasing time (0 at the start of the simulation, 3600 after 1 hour of game time, 36000 after 10 hours, ecc) into a periodic function.
The nice thing is that if you multiply your time for a proper constant before applying the sin function, that is
2PI/day_length_in_seconds, the result will oscillate with a period that's exactly with the same period of your day/night cycle, and will be, save for a time offset, 1 at noon and -1 ad midnight, and this is very useful in a number of situations, as stated in the first part of the answer, and is what you already have. But...
The argument of sin is an angle in radians (at least on most math libraries implementations...) and it happens to be, after a rad2deg conversion (180 x the argument / PI) and normalization (x % 360) exactly the angle you are looking for, that is 90deg at noon, -90 at midnight.
You don't need the sin function at all to compute the angle, because it's the other way around: you already have to have the angle to compute the sin function.
As for lighting, just a few tips: you can use the result of
sin to compute the ambient light, with some rescaling/biasing, and then use the angle to put the sun into the sky and also to compute the diffuse and specular components (if you use the phong model), but first, do read a good tutorial/primer on trigonometry and get the hang of it: it's very basic stuff, and you definitely need that (and more...) for even casual game development ;-)