There are two ways to do this. The easy way and the way that will actually look like it's dark.
The easy way is exactly what you said: throw down a full-screen quad that darkens the scene. But:
I have an idea that put a layer on the top of the game with the transparency about 10 - 20%, and change its color depends on the time, but I don't know which color is good.
That's because there is no "good". There are only varying levels of bad. It will always look like what it clearly is: a bright scene that has been darkened. Real nighttime is not simply a bright scene that has been darkened. Different areas are darker in different ways.
The best you can do is run a bunch of tests and find the color that is least offensive. Nobody can give you a "good color", because such a thing does not exist. There is only "what you personally can tolerate for your particular scene".
The right way to do this is to have your artists redraw all the sprites for a darker scene. Obviously this is labor intensive, which is why most sprite-based games don't have day-night cycles.
Indeed, sprite games that did do some night-time scenes also had the advantage of using paletted sprites. In those cases, they simply created a special "night" palette for the sprites. This gave them the opportunity to tweak the colors for the best visual effect.
You could try something similar to this, but it would require you to use paletted sprites yourself.