Light emission and current rectification in a molecular device: Experiment and theory