There are many factors in my book. Here are what I consider.
Location: Where would you be going if you went in? If you are diving a tower or into the enemy jungle (where an enemy jungler could be waiting) that's a point for staying put. If the enemy is far from safety, that's a point for going in.
Health and Mana: How do you look right now on health and mana? Do you have enough not only to take down your enemy, but to also get back to safety if you get ambushed? What about your enemy? If they have a lot of health and/or Mana, think twice.
Lead: which one of you is doing better, and by how much? It isn't too uncommon to see all ins that fail because the target was simply too fed.
Backup: do you have a reliable teammate that will be able to help you? Also, is the target alone or do they have their entire team with them?
Cooldowns: You know yours, but do you know what abilities and spells the target has on cooldown? If they are likely to have everything ready while you have your ultimate and summoners down, the tide can suddenly be turned against you.
Champion familiarity: How comfortable are you with your champion? If you have only played a few games with him/her/it, you shouldn't dive unless the enemy is practically asking to die.