Why are beer bottles green glass?

Many friends can’t help thinking that this is a beer bottle when they see the standard green glass bottle for so many years, but why is beer always bottled in glass? Is this the case…