Side effects frequency narrative words are defined by the council of International Organizations of Medical Sciences. See slide 10 of this presentation on the subject. As shown, "Very common" means equal to or greater than 10% [of the patients tested for that drug]. "Common" or "frequent" means more than 1% but less than 10%. "Uncommon" or "infrequent" means between 1 per 1,000 and 1%. Rare means equal to or more than 1 per 10,000 but less than 1 per 1,000. Very rare means less than 1 per 10,000.
In turn, for any specific drugs the above metrics are derived, not by doctors, but by specialized clinical trials statisticians conducting clinical trials of such drugs. Clinical trials are conducted by separating patients into at least two groups. One control group just takes a placebo. The test group takes the drug. This type of study is sometimes called randomized double blind placebo control study. This process is further described in this paper. You conduct the clinical trial for a certain period of time. And, then you observe the frequencies of side effects using the semantic as described above. Granted, the statisticians deal with the actual precise numbers and are not satisfied by using narrative categories instead of calculations.
Next, the statisticians will compare the frequency of side effects between the Control group and the Test group. And, they pay much attention where the Test group's side effects are much larger than for the Control group. And, they measure whether that difference is real and not due to just randomness. The latter (probability that occurence is just random) is captured in a probability called a p-value. If that p-value is less than 0.05, the side effect is deemed to be statistically significant (and greater than for placebo).
In the US, the mentioned clinical trials are submitted for assessment and drug approval or denial to the Federal Drug Administration (FDA). In Germany, such clinical trials are submitted to Bundesinstitut für Arzneimittel und Medizinprodukte BfArM.
If you are interested on the subject, the BfArM website has most probably some very interesting information.