The modern concept of atom arised together with modern chemistry in the century XVIII and was clarified times by times while the experimental results were explained. But it was at the beginning of XIX century that it needs an atom hypothese coming from fondamental laws of chemistry:
All these results concurred for the possibility of a real existence of the atoms, but were to predict the formulas for chemical compounds, nor they could predict the ratio between the atomic weights of the different atoms forming a compound. This was achieved only thanks to the great work of Avogadro who, in 1811, showed that identical volumes of different gasses in idetical conditions of temperatures and pressures contain the same number of particles (called Avogadro's number), this implying that the densities of the different gasses are the measures of the masses of their molecules while the volumes ratios between different gasses reppresent the ratios between the number of molecules which combines to form the molecules of the final compound, this extending and clarifyng the work sterted by Gay-Lussac.
It isn't possible for chemistry to foresee the weight of a single atom but it allows to estimate its order of magnitude; to this end it is necessary to know how many atoms are conteined in a given quantity of matter, keeping in mind that a gram-molecule of any substance contains the same number of molecules.
Initially, hidrogen was chosen as the standard to which compare atomic weights, and this because it is the simplest element. Then, when isotopes were discovered, 12C was chosen as the new standard
It was then possible to compose a table the atomic wieghts of all the known element were reported. Of course, these weren't absolute weights, in fact they were (and are) relative weights, all referred to the standard, the most abundant isotope of the carbon (the 12C ); its atomic weight imposed to be equal to 12,0000.