Dr Doolittle, Oxygen, Nitrogen and Hydrogen exist in the atmosphere as diatomic molecules, NOT single atoms. The diatomic compounds have two atoms e.g. O2, N2 and H2.
Whether a material allows molecules to pass through it depends on the shape and size of the molecule. Diatomic molecules are ‘I’ shaped whereas water molecules are ‘V’ shaped due to having 3 atoms.
The ‘I’ shaped diatomic molecules can align themselves with tiny holes in the plastic and pass through easily whereas the ‘V’ shaped water molecules get stuck. That’s why some pipes/materials are water tight but not air tight.
Finally, nitrogen molecules are larger than oxygen molecules, so oxygen will pass more more easily through a solid material. It’s why some garages fill tyres with pure nitrogen instead of regular air.