Mourning attire differs a bit in certain countries and with different religions (cath-vs luth.) and of course with age and relation between mourner and deceased.
The widows cap is indeed something that Victoria brought into fashion.
Usually a period of strict mourning was regarded for the death of a husband or a father, which lasted around 6-12 months depending on the religiosity of the family. Adult mourners wore black, at the end dark grey was accepted. After this period, the family went into half mourning, women were allowed to wear very dark colours such as dark grey, dark brown and purple.
As women would traditionally cover their hair with hats and caps in polite society (and most others just as well) of course the widow would do so too. However since most hats and bonnets were quite adorned with embellishments, those would not do.
Veils on the other hand are deeply steeped in women's attire: a bride wears a veil for her wedding, a nun wears a veil, so to mark the transition into this new stage of womanhood, the widowhood, it makes sense that women turned to the veil again.
And to close the cycle: the bonnet in various drab colours but also white, marked the respectability of a grown-up woman. Again, the widows cap had to somewhat manage the balance between mourning (plain, somber) and showing off your status in society, your wealth and position.