First off, prepositions are tricky words, and it's hard to talk about all the ways they can be used.
That said...
at
We can use at night to mean during the nighttime:
I was there at night.
(notice how I did not say "at the night," which is what you wrote in your question).
in
We can use in the night to mean during the nighttime or at various times during the night:
Hyenas prowl in the night. (at night would work, too)
into
We use into the night to say that something continues for a long time after sunset:
The partygoers reveled late into the night.
on
You are correct, we don't usually say on night or on the night. However, if we expand the phrase, and stipulate which nights we are talking about, then "on (the) nights when..." is a relatively common construct:
The band liked crashing at our place on nights we played at Live Bay.
I try to go to bed early on Sunday nights.
On the nights when we hear the ice cream truck, we'll go outside and buy ice cream.
Now, let's combine some of these together:
We usually lock the front door at night. However, our roommate Micheal is an actor, and he sometimes works late into the night. On the nights Micheal hasn't come home before midnight, we leave the front door unlocked, in case he has forgotten his key.
Best Answer
You see a person through the window when you are inside the room, the person is outside, and the window is closed (through the window's glass). It can also mean you are outside and looking inside, but for that, "behind" is more often used (see below).
Seeing from the window means you are in the room, looking out, while the window is open (similar to "from the balcony").
Seeing a person in the window suggests that you are outside and the person is inside, standing or sitting near the open window (like "in the frame").
Seeing something behind the window suggests that you are outside while the thing is inside, and the window is closed (the object is behind the glass). This cannot be used when you are inside; in that case you see through the window.
In the example in your question, "from" seems most suitable, assuming the window is open (it is the distance that prevented the friend from seeing, not the window).