Your sentence seems to have an extraneous "the" in it.
Also, your sentence would translate as the following:
Is there sun in the sky - ¿hay sol en el cielo?
Is this the idiomatic way of saying "is the sun up?" i.e. "is it daytime?", or is this more along the lines of a sarcastic pointing-out-the-obvious kind of phrase?
I too wondered if it was an idiom, but I thought it might simply mean ''Is the sun out?''. And then I thought the same as you. Maybe it's a Spanish version of ''Is the Pope Catholic?''. Or maybe the compiler just throws sentences together at random from a set of words to be used in this exercise.
Why is 'is it the sun in the sky' not correct? Without context, both seem to be similar to me...
It would have a very different meaning. One is a question you could ask without seeing the sky at all, the other one is a question confirming that it is indeed the sun, and not something else. I just suggest that both should be correct.
You're right they have different meaning. "Is it the sun in the sky" would be "es que el sol en el cielo?"
¿"Es el sol que está en el cielo?" But this is not the DL sentence. The English translation should be of the DL sentence, not another sentence with some of the same words but with another meaning.