Mice were used, and exposed to UV radiation to promote skin cancer. Some of the mice were coated with a cream heavy with caffeine. These caffeinated mice developed 72% fewer tumours than those mice not treated with caffeine. The caffeine didn't just prevent the tumours from forming, it actually killed the cancer cells.
There has been limited research into the effects of topical treatments for humans, though also including a tea extract (polyphenols) rather than caffeine. The results are promising.
There have been no studies yet on the effects of drinking tea or coffee, on the occurance of skin cancer.
References
Can Coffee Fight Skin Cancer?
Caffeine May Cure Skin Cancer
Caffeine May Lower Skin Cancer Risk
Green Tea May Help Prevent Skin Cancer
