This is a very old trick that is used in films. It enables you to shot during the day time and make the image look like night time. This has huge benefits as it means you can keep very high shutter speeds and shoot whenever you want to without the need of flash lights.
There are a few things to consider to enable you to get the best results.
Make sure the sun is behind the subject.
Shoot during the golden hour to avoid harsh shadows.
Underexpose by at least 2 stops.
The highlights are not blown out/overexposed.
A clear separation between the sky and the foreground.
Taking the pictures
Take pictures as normal, if you are having problems then put the camera on to a tripod and set the camera to AV or A and select an aperture of F11. This will get you an image that is workable in photoshop. If you have a polarising filter then this will help stop reflections and also take one stop of the exposure, it will also add some contrast.
Add a Hue/Saturation Adjustment Layer.
Click the icon that looks like a hand pointing with left and right arrows, then click somewhere in your sky to select the Blue color range.
Adjust the Lightness to -50 to darken the sky.
Add a Brightness/Contrast Adjustment Layer. Set the Brightness to -50 to darken the image.
Add a Color look up Adjustment layer.
Under the 3DLUT File dropdown, select NightFromDay.CUBE.
Set the Opacity of the Color Lookup Adjustment Layer to around 60% - 70% in the Layers panel.
Add a Curves Adjustment Layer. Set two points as shown in the photo, simply drag the line to the points.
Use the Dodge and Burn tool to darken and lighten areas. Set the Range to Midtones and the exposure to around 50%. Paint in the areas you would like to adjust.