You should figure out how many calories you're burning in a day. A healthy calorie amount is 500-1000 less calories than what you're burning. If you want to maintain, aim for about the same amount (obviously).
If you're gaining weight, either you're eating too many calories (or not burning enough) or you have some other medical problem. If you can't rule out the calorie thing, get yourself to a doctor.
Since you mentioned irregular period, do you have a history of pcos at all? That can cause weight gain. Or a thyroid problem, or a ton of other things.
Also, it's normal to weigh a pound or two more during your period, due to water retention.