You can get headaches at any age, the problem with babies and toddlers is they can not verbalize to you.
Sometimes they are just cranky, may have episodes of throwing up, shy away from bright lights of become less active. In any event triggers include being over tired, not enough sleep
and certain foods to mention a few. If you suspect you child may have migranes, consult a pediatric neurologist.