I have this headcanon, that angels can tell when someone is a vessel and to what angel they belong just by looking at their souls. Because vessel’s soul have something in common with the grace of that particular angel. For example, Sam’s soul is unusually bright. Dean’s soul is warmth and almost looks like flames (Michael’s Sword).
So when Lucifer turns around and sees Dean’s soul for the first time here, he’s not taken aback because of the hunter or the gun that can’t kill him (and he knows that), but because for the fraction of a second it’s Michael standing in front of him. The brother he hasn’t seen in centuries. It’s no wonder he goes on to ramble about Michael right after this scene.