Oxygen: geological information
Oxygen gas (dioxygen, O2) makes up 21% of the atmosphere by volume. It is the most abundant element in the earth's crust (followed by silicon). It is present in any number of minerals and makes up most of the weight of water. Oxygen is the third most abundant element found in the sun, and is involved in the carbon-nitrogen cycle, one of the processes responsible for stellar energy production. The atmosphere of Mars contains about 0.15% oxygen.
Abundances of oxygen in various environments
In this table of abundances, values are given in units of ppb (parts per billion; 1 billion = 109), both in terms of weight and in terms of numbers of atoms. Values for abundances are difficult to determine with certainty, so all values should be treated with some caution, especially so for the less common elements. Local concentrations of any element can vary from those given here an orders of magnitude or so and values in various literature sources for less common elements do seem to vary considerably.
The chart above shows the log of the abundance (on a parts per billion scale) of the elements by atom number in our sun. Notice the "sawtooth" effect where elements with even atomic numbers tend to be more strongly represented than those with odd atomic numbers. This shows up best using the "Bar chart" option on the chart.