Photons pass through glass because they are not absorbed. And they are not absorbed because there is nothing which "absorbs" light in visual frequencies in glass. You may have heard that ultraviolet photons are absorbed by glass, so glass is not transparent for them. Exactly the same happens with X-rays for which our body is nearly transparent whilst a metal plate absorbs it. This is experimental evidence.
Any photon has certain frequency - which for visible light is related to the colour of light, whilst for lower or upper frequencies in the electromagnetic spectrum it is simply a measure of the energy transported by photon. A material's absorption spectrum (which frequencies are absorbed and how much so) depends on the structure of the material at atomic scale. Absorption may be from atoms which absorb photons (remember - electrons go to upper energetic states by absorbing photons), from molecules, or from lattices.
There are important differences in these absorption possibilities:
- Atoms absorb well-defined discrete frequencies. Usually single atoms absorb only a few frequencies - it depends on the energetic spectrum of its electrons. Regarding atomic absorption, the graph of absorption (plotted as a function of frequency of light) contains well-defined peaks for frequencies when absorption occurs, and no absorption at all between them.
- Molecules absorb discrete frequencies but there are many more absorption lines because even a simple molecule has many more energetic levels than any atom. So molecules absorb much more light.
- Crystalline lattices may absorb not only discrete frequencies but also continuous bands of frequencies, mainly because of discrepancies in the crystalline structure.
As glass is a non-crystalline, overcooled fluid, consisting of molecules, its absorption occurs in the 1st and 2nd ways, but because of the matter it is composed of, it absorbs outside our visible spectrum.
This colour change effect occurs when the strands of plastic material, the polymers in the plastic, start to stretch as you twist the plastic. As they do so, this changes the way the light is reflected from the plastic. Say for example, you chew a biro top, by doing so, the Refractive Index of the plastic is altered, from its original colour, to a whitish colour. Once the light is scattered, you start to lose the original colour the plastic had.
From Why does stressed plastic turn white? gives a fuller explanation of the colour change effect
Many polymers are semi-crystalline, containing both crystalline and amorphous (non-ordered, think spaghetti) regions. When the crystalline region size is on the order of the wavelength of light, it can scatter light making the plastic opaque. For polymers that are entirely amorphous, you have no crystalline regions and thus the polymers are transparent..... You can think of the amorphous regions as something similar to spaghetti, a messed of tangled polymer chains. When you bend the plastic (i.e. stress), you are forcing those polymer chains to align in the axis of strain, inducing crystallization in that region, which can then scatter light and turn the plastic opaque or white.
Here is the formula of polyethylene, the plastic that makes up mineral water bottles, it's 2 carbon atoms and 4 hydrogen ones, linked together in long hydrocarbon chains, for the exact chemical formulas of various plastics you could look up Wikipedia or ask on ChemistryStackExchange, but I would imagine it's the same physical process that occurs to change the colour, which is the physics part of your question:
and this is a bit of the polymer chain, join enough of these together and you have a plastic bottle:
Best Answer
Found this on a Amazon.com review
Then here is a link (http://www.popularmechanics.com/technology/design/a21265/smart-glass-will-become-transparent-or-opaque-at-the-flick-of-a-switch/) about 'smart glass' which becomes opaque and transparent as needed.
Another article about smart glass
https://en.wikipedia.org/wiki/Smart_glass