All other things being equal, a happy worker will be more productive than an unhappy worker. However, this does not mean that all happy workers are productive or that all productive workers are happy.
In general, happiness is conducive to productivity. When workers are happy, they will tend to have higher morale. They will be more satisfied with their jobs and will be more motivated to work hard. Such workers will, not surprisingly, be more productive than workers who are sullen and who will only do the minimum required. In this sense, then, a happy worker is a productive worker.
However, this does not mean that all happy workers will be productive. A person could potentially be very happy but still do a very bad job at their work if they lack the skills that are needed. A worker could be happy because their manager is very lax and does not push them to work hard. Such a worker would be happy but unproductive. Therefore, it is not accurate to make a blanket statement that a happy worker is a productive worker. However, a happy worker is going to be more productive than an unhappy worker if all other variables (skill level, managerial competence, etc.) are the same for both workers.