When taking photos at night your camera will automatically pop-up the flash and generate a powerful beam of light that will light up your immediate surroundings. This is great for close-up situations and for capturing those precious moments that you don’t have long to get.
However, the flash can be useless and thus spoiling your photograph when shooting from a longer distance or trying to capture a nicely lit building. The camera will shoot with a faster shutter speed when the flash is fired, this because it is relying on the flash’s light, but sometimes your camera isn’t that clever.
So the first thing to do is to get out of the auto mode and simply turn the Automatic Flash off. If you have the option of Shutter Priority than set your camera to that, otherwise just use the No-Flash mode.