In the last 10 years I have done more than my fair share of open houses. Do they actually get the house sold? In ten years I have had 1 person that came to an open house actually buy it.
Open houses do give people in your neighborhood a chance to view the house and they may possibly know somebody that wants to live in the area. However, home interiors are so accessible via the internet that people tend to look there before going in to an open house (this is why professional photos are so very important - another blog topic to come). This creates an anonymous buffer. If they like the homes features and the way it 'feels' from the photos, then they will generally call to set up an appointment to view the inside.
So what is the purpose of an open house? An open house tends to be more directed at self promotion for the agent. It is a chance to meet passerbys and advertise their name on every corner near the house via 'A-Boards' with the hope of gaining business and name recognition. Nothing wrong with that, it is a mutually beneficial. It gets people in to view your home and free advertising for the agent.
Depending on the home I tend to do an open house right when the house goes on the market. Why? The first weekend tends to be when the most traffic goes through the house. So you let the neighbors in to view the house (just in case they know somebody that wants to be in the area). Also, you tend to be there when agents bring their client's through. The purpose of this is to point out features to these serious buyers that they may not have seen otherwise. If they are out with an agent then they tend to be pre-approved and serious. Those are the people you want in there. I will also, sometimes, do an open when there is a price drop to catch the same potential buyers with their agents.