Person A: They didn’t select my application for the vacant position.
Person B: Oh, I see. Hard luck.
Meaning:
Person B used the expression “hard luck” to show some sympathy to person B whose application wasn’t taken for the job and it wasn’t his fault.
“Hard luck” is used to express sympathy to someone about something bad that has happened.