There is no riwayat of topi or cap
This is social and it is in the respect of prayer and recitation of quran
Yes sunnat is Ammama because rasul saw and Our Imams they used to wear and for girls and women covering head which called hijab it is wajib