Screenshots don't write file
tl;dr

Open the terminal and write

defaults write com.apple.screencapture location ~/Desktop
defaults write com.apple.screencapture target file
killall SystemUIServer




Explanation

Being on Mac OS 10.14 (Mojave), I ran into the same issue. At one point the screenshot shortcuts 'would not work' anymore. 
(I was able to save a screenshot to clipboard using Cmd+Shift+Ctrl+3, but it wouldn't work to save a screenshot to the desktop anymore.)

Looking at the output of defaults read com.apple.screencapture in the terminal, I noticed a target = clipboard; being set:

{
    "last-messagetrace-stamp" = "568547998.720744";
    location = "/Users/kim/Desktop/";
    target = clipboard;
}


Changing the target back to file (defaults write com.apple.screencapture target file) and restarting the SystemUIServer (killall SystemUIServer) would restore the expected behaviour.

It looks like the new screenshot controls which were introduced in Mojave overwrite the target setting (Cmd+Shift+5, see the official apple support page for more information). When selecting "Clipboard" in the "Save to" menu, the target in com.apple.screencapture will also be set to clipboard. For some reason, this setting will then also affect the "take screenshot to file" shortcuts.

Note: Of course, you could also reset the target setting in the new screenshot controls. Just choose any folder location in the "Save to" option (e.g. Desktop, Documents or any other location) and the target should be set to file again.