When the eyes of the player are below y = 63 (feet at about y = 61), the sky goes dark. This also happens on superflat worlds, but they are usually so low that it's hard to notice.
Create a Customized world with Ocean or Deep Ocean as biome and a low sea level.
Based on 1.11.2 decompiled using MCP 9.35 rc1
This happens when the player eye level is below net.minecraft.world.World.getHorizon() which might be done to not have a blue blackground when you are in caves. It would be good if this effect was achieved differently.