The primary cause of BCC is prolonged exposure to ultraviolet (UV) radiation from the sun or tanning beds. UV radiation damages the DNA in skin cells, leading to mutations that can result in cancer. Other risk factors include fair skin, a history of sunburns, a family history of skin cancer, and certain genetic conditions like Gorlin syndrome.