There are many causes of irregular periods
Stress, anxiety, weight loss
or weight gain, emotional trauma is one reason.
imbalance due to thyroid disorders, adrenal disorders etc, or polycystic ovarian disease
both are leading causes of irregular cycles.
Again, some local pathology in the uterus or ovaries might cause these problems
At the extremes of reproductive life, both age groups might naturally face irregular cycles.
You should consult your gynecologist for a detailed evaluation and all investigations to pinpoint the cause of irregular periods.