Quite a few lighthouses have this characteristic, it’s usually one rotating light, and coloured glass for the different sections. The idea is that you can safely approach the lighthouse in the “white section” only, the others are for guidance: green to your right and red to the left (at least over here in Europe where we use IALA A, in America it’s the other way around). When you can see white, it should mean you have a clear way towards the lighthouse. Then, as you get nearer to your port, you get again a green light on your right and red on the left, and that’s the right way in.
As for where you’re with respect to any light, what you need is chart and compass. Usually there should be only one light with a certain characteristic in the area, which you can then track down in your chart. With a compass you get a bearing, and you now know you’re somewhere on a line. Find another lighthouse (or other landmark), get the bearing, and you can know where you’re fairly precisely!
(Source: I’m getting my sailing license :-)