This has been a particularly annoying error I encountered today and which I took a lot of time to find the solution.
Basically the problem as it occurred for me was this: whenever I tried to take a screenshot with my Galaxy Note, a message came up that said, "Unfortunately, System UI has stopped".
I'll tell you the solution I found. It was to go to my phone's Settings -> Application manager, and then in the Application manager, I clicked on the "3 dot" menu in the top right corner. From there, I went to "Apps that can appear on top". From the "Apps that can appear on top" screen, I clicked the "3 dot" menu on the top right of that screen and I clicked on "Show system apps". And finally, I scrolled down the list until I found the System UI app listed, and I turned the permission switch to ON.
And that was it, the error is gone.