I think yellow is an innately cheerful colour. Don't know if that's because it's the colour of spring flowers, the sun or if it's just something about it.
As to whether or not spring flowers are yellow in order to cheer us up, I suppose that depends on whether or not you believe in a being that is creating things with us in mind.
Whatever - in this miserable sprwinter, the daffodils have been better than ever, and they have definitely been welcome for their cheeriness