You need to have some idea of the volume envelope of the particular synthesizer voice that will be responding to the midi messages.
Usually when you trigger a note-on, the synthesizer attached will play the attack portion of the sound, then the decay portion of the sound, until it reaches the sustain level. When you release the note (sending a note-off), the note will decay (die away) according to the decay time.
With percussive sounds, the attack time is often zero (very fast), and the decay time and release time are often exactly the same. This means that the duration of the MIDI note is actually completely irrelevant - you can send the note-off after a millisecond or a minute, and it will make no difference (apart from some subtleties related to how voices get allocated, but we can ignore that for now).
A piano sound will also have a fast attack, and then start to decay to zero. The release time is then very fast, because the note gets damped when the note is released. I think you are on the right track when you said you need to think about how long a human player would actually hold the note down for. Remember that musical style and playing technique make a difference - in some cases on a piano you might play the notes so long they overlap; in other cases you'd play them short and staccato. Also, you have the option of using MIDI damper/sustain/sostenuto controller messages to extend notes, rather than note-offs - again, depending on how the synthesizer is programmed.
Note that with sample-based synthesizers, you also have to consider the volume envelope inherent in the sample being played, as well as the synthesizer parameters.
But basically : If the sustain level of the synth voice is zero, and the release time and the decay time are the same, it makes no difference when you send the note off. In all other cases, it will make a difference.