The adjective twinkling refers to light that appears sporadically bright and then faint. When the light from stars is twinkling, it may look as if they're winking at you.
Of course, it's not the stars themselves that are twinkling, but their light, which gets refracted as it passes through the turbulence of the earth's atmosphere. The same goes for the lights of distant cities or any other lights that stay constant but appear to brighten and dim. As a noun, twinkling means something brief, as in "the twinkling of an eye."