Sitting at my desk, I can look out onto my backyard through sliding glass doors. So why can I see my backyard at all? That is, why is glass transparent? We take the clearness of glass (and plastics) for granted, but this property is incredibly important. Seeing the birds in my backyard may not be critical, however, seeing oncoming traffic when I'm driving my car is. Allowing light into my home through windows saves the energy required to illuminate my home so I wouldn't walk into things. Think of the deli case at your local supermarket – the glass allows you to see the goodies inside, but protects them from the other customer's germs.
I wrote about the history of glass here, however, the fact that glass is clear likely kept us using it for so long. For example, my house would be a lot more secure from break-ins if I replaced all the glass windows with steel plates. Two physical properties play a role in making something transparent, the object itself and its sub-atomic makeup.
Transparency to visible light is common in the stuff around us -- For example, air and water. In fact, many gases and liquids are transparent because their structure isn't rigid, leaving plenty of room for light to pass through. However, solids don't tend to be transparent because they have a tighter, more orderly structure, making it harder for light to pass through. Glass (and clear plastics) are made by heating their components, mostly silica sand, into liquid form and then allowing it to cool. As a result, glass is rigid like a solid with a random structure like a liquid making it possible for light to pass through.
Light acts both as a wave and a particle. If we consider light as a particle, which is called a photon and contains a certain amount of energy, it can interact with the electrons in the matter around us. When a photon encounters an electron the following may occur:
1.The electron absorbs the photon's energy and vibrates a little faster – that is, the photon's energy has been converted to heat.
2.Again the electron absorbs the photon, but this time it stores the energy and re-emits it later, a phenomenon called luminescence. Think of an analog wrist watch (remember the ones with a two arms and a circle of numbers?). Often the numbers were painted with a substance that would absorb light and glow, allowing you to see the time in the dark.
3.The electron can absorb the photon then re-emit it back in the direction it came from. This is reflection and is why you can see your image in a mirror.
4.Finally, the electron may not be able to absorb the photon at all, so the photon just passes by.
These electron/photon interactions can all occur within a single substance, or some combination of them. If only case 4 occurs, that is the electron's within an object can't absorb a photon in the visible light spectrum, that object will appear transparent. Glass has this property, which is why it makes great windows.
As a tangent, glass absorbs much of the UV spectrum which is why you can't get a tan behind glass.