Wikipedia answers this on the Boeing 737 page:
Most 737 cockpits are equipped with "eyebrow windows" positioned above the main glareshield. Eyebrow windows were a feature of the original 707 and 727. They allowed for greater visibility in turns, and offered better sky views if navigating by stars. With modern avionics, they became redundant, and many pilots actually placed newspapers or other objects in them to block out sun glare. They were eliminated from the 737 cockpit design in 2004, although they are still installed at customer request. These windows are sometimes removed and plugged, usually during maintenance overhauls, and can be distinguished by the metal plug which differs from the smooth metal in later aircraft that were not originally fitted with the windows.
To add to Steve's correct answer, Boeing has historically designed aircraft with less than ideal visibility for the pilot. Case in point: Their first all-metal passenger aircraft, the Boeing 247. Its design was ahead of its time and prompted TWA to convince Douglas to build the DC-1 and -2, but was marred by two details: The wing spar was not below the cabin floor level; instead, Boeing expected passengers to climb over the spar on their way to their seat. Many airlines were less enthusiastic and rejected the aircraft in favor of the DC-2 and -3, which also offered more seats.
The second detail was the cockpit window: It was sloped forward, so the visibility in the upper hemisphere was severely restricted. In turns the pilots were basically flying blind. The idea was to angle the window glass such that the instrument lighting would not reflect in the glass, but Boeing soon realized that this was creating new problems, and from the 247D on the window was sloped aft.
Forward fuselage of the Boeing 247 (picture source)
When the 247 was offered to Lufthansa, it was rejected for this particular reason. I guess Boeing engineers were very sensitive to get the visibility right after the 247.
I'm an MD-80 pilot (they have huge eyebrow windows). The eyebrow windows were originally used in tight turns to help the pilots align with the runway. However, nowadays, it doesn't really add that much visibility. All it really does is just have the sun shine into the pilots' eyes. I'e usually cover them up with IFR charts, or checklists. They look cool on the outside. But they're not great on the inside. In addition, the more windows you have on an aircraft, the more time you spend cleaning, checking them, etc. So, by removing the eyebrow windows, some maintenance time was saved.
A major point in removing the 'eyebrow panels' is reduced costs over the life of the aircraft.
Also in most of the aircraft I've been in they're usually blocked with paper or similar for most of the flight if its sunny! I've heard they reduced noise as well but I haven't been in the newer ones yet and what with the rules on jumpseating getting stricter looks like I'll never have the chance!