To fix the sentence, it should be the following:
On a clear night, when the moon is in the sky, gaze up at it.
The changes I made were as follows:
on > On
night > night,
sky > sky,
it > it.
It was more adding the commas in where they needed to be and capitalizing the sentence as well as ending punctuation.