Airplane windows used to be square, like the windows in your house. But there were some serious engineering problems with this approach. Windows are essentially gaps in the plane's fuselage, and having large flat edges and sharp corners puts a lot of stress on those areas. To minimize surface area and eliminate corners, airplane windows became small and oval.
There's another factor at work here: fatigue. Over a plane's lifetime, the air inside and outside the plane is constantly changing pressure, which makes the fuselage expand and contract slightly. Over time, this causes small defects to expand and eventually leads to failure. This property limits how large the windows can get, because a larger window means more defects and a shorter lifespan.
Past airplane fuselages were made with aluminum, but the 787 Dreamliner is made with carbon fiber, which resists fatigue better and can last longer. As a result, the Dreamliner's windows can be much larger than previous models, allowing you to get a better view as you fly.
(Avery Thompson - Popular Mechanics)