Check if someone is about to die. Is someone about to die? Make sure they're not about to die.

Is it time to DPS? No.

Double check if they're about to die. REALLY make sure nobody is about to die.

Now you can throw out rocks or poison or imploding stars or whatever. Eventually you learn when the damage is coming out and you can get more comfortable throwing out more attacks, but don't feel bad about standing around a few seconds if you're in a duty for the first time and not sure what's going on exactly, just realise that next pull those few seconds could be spent doing damage. Like any job you're looking to optimise your time and it's a gradual process.