OO is just one design pattern of many; it should be used when the mental model is a good fit for the problem domain. It does annoy me, though, when languages or frameworks force the use OO when it's unneeded.
Use a function when you need a function, and a class when you need a class.
Use a function when you need a function, and a class when you need a class.