this seems to be an intermittent problem, no idea why flash wont work even in low light!
More aboutnikon digital flash working
What is the ISO setting?
Change the settings to force the flash to fire regardless of light conditions. If it consistently fires, the problem is probably elsewhere... perhaps other settings, metering, etc.
try to force to open the pop-up flash by pushing the "Flash pop-up button". Check the manal for the location or go to Nikon website if you don't have one. Then fire your camera to see the flash work or not.