it depends how you sleep. if you sleep on your back or especially the stomach, you need more support - that is, a more firm bed. so, a floor in that scenario may be somewhat more comfortable than a soft mattress. people with back pain also sometimes need more firmness to hold their back up, so again, a floor is good. if you sleep on your side, however, you need your hip and shoulder to sink into the bed so that your spine is straight with your neck and sleeping on a floor is likely to be uncomfortable and bad for you.
in general though, you want at least some padding. mattresses help to distribute your weight over your body parts; sleeping on a hardwood floor will keep all the weight on just the points of your body are in contact with the floor. this will often put too much pressure on those parts and you'll end up tossing and turning and often wake up sore. a matress pad (like a 3" thick latex pad) on a hardwood floor might be a good compromise.