All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.{C}
There is no harm in combining the Maghrib and ‘Ishaa' prayers when it is raining; a rain that wets the clothes, according to the view of the majority of the scholars. Therefore, if the rain, due to which the Imaam combined the prayers, was heavy enough to wet the clothes, then your prayer is valid.
However, if the rain is light and does not wet the clothes, then the scholars stated that light rain does not permit combining the prayers as there is no hardship because of it.
For more benefit on the issue of combining between two prayers, please refer to Fataawa 117728, 43176, and 92708.
Allah knows best.