What determines how fast atoms or molecules move in substances?

1- the amount of energy (heat) they have
2- the amount of light they have
3- the amount of distance between the atoms
4- the amount of space they take up