Restarting an iPhone can wipe out temporary glitches in memory, which can restore, for example, an unresponsive screen. Of course, if the touchscreen is not working, you can't shut down the phone ...