How important is it for an undergraduate student majoring in Physics and Mathematics (or any other science) to have experience in research (e.g., have a peer reviewed paper to his name most probably in collaboration with a professor) at the undergraduate level, keeping in mind that he will be applying for a master's or other postgraduate degree?
If you want admission to the very best PhD programs in the US, prior formal research experience is very important, if not necessary. Admissions committees are primarily looking for evidence of research potential. The best possible evidence for "I'll be a good researcher someday" is "Look, I'm already a good researcher." So having formal peer-reviewed publications is better than having publishable but unpublished results, which is better than having research experience but no publishable results, which is better than having no research experience. If you're applying to the top PhD programs, you will be competing with applicants (yes, plural) who have peer-reviewed publications (yes, plural).
In the U.S., in mathematics, it is a bit unusual to have a peer-reviewed publication from an undergrad, despite the recent years' push for "Research Experiences for Undergrads". In some cases there are group-written papers in second or third-tier journals, but nothing too serious. Or the undergrad gets to be the tag-along on an applied-math research "team". Indeed, it is exceptional, and only rarely happens, that an undergrad in mathematics has adequate background (disregarding future potential) to make a serious contribution. It does happen, but rarely, and is not at all "expected". Evidently the situation is much different in other fields.
In terms of literal admission to good-but-not-elite programs, the usual "publications" we on admissions committees see are "nice", but not really evidence of future potential so much as enthusiasm, ... which is a good thing, for sure! ... but the level of focus and effort required for these little papers is far, far different than the level of commitment required to do a Ph.D., with or without "talent".
During my studies it was relatively rare to publish as an undergraduate. The level of research needed for a peer reviewed publication is imo higher than what an undergraduate can produce. Maybe if the supervisor writes a paper based on your results, and with a lot of help with producing the results, this might lead to a co-authorship for the undergraduate. Therefor, I think that in the Dutch system (my experience) a peer reviewed publication would be a plus, but definitely not a requirement for admission into a masters program. Ofcourse, you need have written a thesis, but it does not have to published in a peer-reviewed journal. I do not know how this experience translate to, say, the US, but I know for countries like Germany it is not even always usual for a PhD to write peer-reviewed articles.