Note that I’m not familiar with the specifics of traffic lights in India, but as far as I know, the rules below are nearly universal.
The first thing is that traffic lights are normally always in the same order. So as long as you can see the different lights whether they’re on or off (i.e. most of the time except maybe at night when you may in some cases only see the light which is turned on, so can’t determine it’s position among the other lights), you should be able to determine which light is on.
The other thing is that the sequence is well known. Green, then yellow/amber, then red. If you are able to distinguish green, you know that if the light changes, it will be yellow/amber, not red, and it will then take a few seconds to turn to red (the timing normally depends on the expected speed at that location).
In the rare cases when you could not make that difference, contrary to what many people (wish to) think, in most countries both yellow/amber and red actually mean “stop”.
The difference between the two is that when the light is yellow/amber, you should only stop if you can safely do so. When the light is yellow/amber, you can still go through, and usually won’t be fined if you do, but if you can, you should stop.
Of course, in many places most drivers will be extremely displeased if you stop at a yellow/amber light when they are used to squeeze every last seconds of it (and possibly even the first few seconds of the red light), but that’s not really your problem.
So in the rare cases you really don’t know, you can legally stop, just make sure you don’t surprise other drivers behind you: don’t stand on your brakes as soon as the light changes from green, for instance. But if you stop carefully, and get to a stop even before the light actually changes to red, then there’s nothing wrong with it, quite the opposite, that’s what you are actually supposed to do.