Next time when it will happen open Event Viewer application error log to find out what went wrong.
Open Command Prompt as Administrator
Type sfc /scannow and press Enter.
Try to change the wallpaper in Safe mode.
A corrupted user profile can cause this issue. Create a new local user account.
Update Graphic card driver.