White spots on the skin can be caused by sun exposure or conditions including milia, vitiligo, or pityriasis alba. The spots appear when there is a loss of skin pigment or from trapped skin cells.