In Chapter Six of Philosopher's Stone we have the following statement:
"Yeh'll get yer firs' sight o' Hogwarts in a sec," Hagrid called over his shoulder, "jus' round this bend here."
This takes place after they have already detrained and walked a bit. This implies that the students could not have seen Hogwarts at any point during the train journey itself.
However, in Chapter Ten of Order of the Phoenix we find the following:
Harry was sitting with his forehead pressed against the train window, trying to get a first glimpse of Hogwarts, but it was a moonless night and the rain-streaked window was grimy.
This implies that if not for the specific conditions present then, Hogwarts could be seen from the train.
So which is it? Is there a point during the train ride where you can catch a glimpse of Hogwarts, or isn't there?