In reality at least, it's a combination of factors. Like how underexposed is the image, where is the sun ? in front, or behind the camera ? Or using a polarizer filter (translation for a 3d render : use post processing or separate controls for sky).
Even the lens size can be a contributor factor, like if the lens is very wide or tele. With very wide you can get a stronger gradient, from a bright blue to dark.