Are warts caused by bad hygiene?

It can be a factor. There needs to be an opening in the skin for the virus to get in. Poor hygiene could be a factor.
No. Warts are caused by viruses. Anyone can get them. Some people are more susceptible than others.