When you cast the spell, or as an action on a later turn, you can hurl the flame at a creature...
The spell produce flame allows you to do one of two things:
- Cast the spell and hold the flame as a light source, potentially throwing it as an action on a later turn, or
- Cast the spell and immediately hurl the flames, making your attack as part of the same action.
The rule about readying actions says,
When you ready a spell, you cast it as normal but hold its energy, which you release with your reaction when the trigger occurs.
So you can ready the spell produce flame, casting it and holding its energy, but at this point it's just energy -- none of the spell's text takes effect yet. When the trigger occurs, you use your reaction to complete the casting, and at that point you follow the spell's text. For this particular cantrip, that text allows you to either hold the flame in your hand to shed light, or throw it immediately.
You can cast the produce flame spell and throw the flame all as part of the single reaction, but you can't cast the spell fully, holding the flame in your hand to benefit from its light, and at the same time ready an action to throw the flame. That would be using two actions in one turn, which is not allowed without some kind of special ability.
You could cast the spell on your turn, hold the flame, then on your next turn, ready an action to hurl it if a specific trigger occurs. But in that case, you'd be splitting it across multiple turns, not taking two actions at the same time.