A meson can be produced by a high energy photon scattering off a nucleon in an interaction such as
$$\gamma + p \rightarrow p + \pi^0$$
As long as the photon is sufficiently energetic, mesons heavier than the pion can be produced, as well as multiple mesons such as ##\pi^{+} + \pi^{-}##...