When you take a photograph either inside or out, your camera will determine whether it needs to use the flash or not. And most of the time it does a good job… but not always. When you are faced with shadows, it's best to turn your flash on. This will lighten shadows and make your photo just that much better.
However, if you have a fair bit of light coming through, you don't want to use the flash, as it will over expose the picture and make it hard to see what is being photographed.