The problem is called Terminator Effect (google it). When you render, subdivider modifiers are activated and the shadows should be smoothed. You can preview this enabling the Subdivision modifier in the mesh you want to test. Note that this modifier can impact the performance of your viewport rendering. Thus, after you test its behaviour, remember to disable it (only in the viewport)! Another solution might be to enable the Shadow Terminator Offset.