Exploring photocatalytic processes at the atomic scale