Unraveling atomic-scale quantum and chemical processes with optically-coupled electron microscopy