Yes, so long as the trigger condition is met. If someone uses a reaction that damages you, you can absolutely cast Hellish Rebuke on your turn.