Andrew Price showed in one of his tutorials how to use a white material node in the Blender internal render to get the brightness of a point and assign the texture accordingly.
In this case: Point is bright: assign daylight texture; Point is dark: assign night light texture
Is there anyway to reproduce that in cycles?