The purpose of "The Open Window" is to show that people can be deliberately malicious and cruel, especially to people who reveal their vulnerabilities. We know that the main character, Mr. Nuttel, has shared his nerve disorder with his hosts. In fact, his hostess, Mrs. Sappleton, says he "could only talk about his illnesses."
The fifteen-year-old Vera, Mrs. Sappleton's niece, also finds out that Mr. Nuttel barely knows her aunt. She takes advantage of this information to deliberately frighten Mr. Nuttel with a false story. Vera lies and says that her aunt's husband and two children disappeared one day while hunting. She explains that Mrs. Sappleton keeps the window (what we would call a French door) open in the deluded hopes they will walk back through it one day. Of course, they are quite alive. When they come in, Mr. Nuttel runs off, thinking he's seen ghosts.
The story implies that Mr. Nuttel is a bore about his illnesses and that Vera is getting revenge. It warns that people like Vera, despite polite manners, are not all sweetness and light. They are capable of manipulation and amusing themselves through cruelty. We all have an aggressive streak, which can come out passive-aggressively in how we treat people. The message of the story is not to assume that people have your best interests at heart.