depends on a few factors. Chair height, distance to monitor required etc. A tray can be more flexible in those aspects.
I use my on the desk in the office with no issue - the monitor is a 19" 4:3 model, so I don't actually have to sit too far back to see everything. The height is just nice for that.
At home where I run dual screens, I need to sit much further back, and my table isn't long enough. A tray extends out from under the desk for that. But the lower height from an extended tray could play havoc with your back if it doesn't allow you to sit properly on your chair (legs 90 degrees, feet flat on floor). Ideally I'd rather had a larger table so that I can sit further behind without a tray, but that wouldn't be practical for me as of now, for other reasons.
As with everything ergonomics, the answer is, it depends.