Oatmeal is helpful in weight gain or weight loss?

Either. If you eat too much of it, and it's filled with sugar, cinnamon and raisins, it will make you fat. If you eat a reasonable portion size without a lot of sugar, then it's filling, high in fiber, and can be part of a healthy weight loss plan.
Both. It depends on the whole diet. The fiber in oatmeal is filling, and can be part of a diet to help you feel full. If however, you eat more calories than you need- you will gain weight even if you eat oatmeal.