One technique I discovered is to shoot when there is a bit of light left in the sky. Wait 15-30 minutes after sunset. By then all the city lights will have come on, so you get the lights, plus you get a hint of blue in the sky.
I agree with the general point but I think I'd tend to wait a little longer - though the right time can come and go very fast. Here's an example of a sequence of shots as the light faded. I observed the sun go down over the mountains at 21:02 , and these shots were taken at 21:06, 21:41, 21:51, and 22:01. To my mind the best is somewhere between the 2nd and 3rd, which suggests about 45 minutes after sunset.
However the latitude at which you live has an effect. These shots are of Vancouver, which is at a relatively high latitude (49 N) so the twilight is quite long. On the day in question this sunrise/sunset/twilight calculator says sunset was "officially" at 21:14 and civil twilight ended at 21:56. So that suggests that the best shots were taken about 3/4 of the way from sunset to the end of civil twilight. If you live in a low latitude the interval from sunset to the end of civil twilight is much shorter, so you need to work faster.
But the great thing about digital photography is of course that you don't have to time it exactly right. Just take a load of photos, like I did that day in Vancouver, pick the best and dump the rest. It's great fun.
please log in to view hosted photos in full size.