Given that I have the melody of a song, how can I find the more comfortable key to sing? I want to transpose the melody to be comfortable for the greatest number of people - with all voices (soprano, tenor, alto, bass) singing unison.
What you want to do is
1. Figure out the required range of the melody (such as for example a sixth, an octave, or an octave and a fifth). That means finding the lowest note and the highest note used for the melody (and determine the interval between those).
2. Fit the middle of that melody range1 best possible to the middle of the average musically useful2 singing range of the people who are supposed to sing the melody.
3. Figure out the resulting key. You figure out the resulting key by knowing that the key is transposed the same amount as you transposed the whole melody range. (Or the same amount as the lowest note, etc...)
Now, I assume that your question is about having a bunch of non-classically trained "Average Joe" and "Plain Jane" singers sing the melody in unison. So the actual question is: what is a musically useful range for average adults? (I've asked this same question but regarding children.)
Let's first state that, for "unison" singing, the women will (generally) sing one octave above the men.
So let's take a couple of examples:
Example 1: Somewhere over the rainbow
Example 2: We wish you a merry christmas
As you notice you can't say that a specific key is always (or generally) suitable for any song since the tonic root note can be in the middle of the register required for the melody just as well as it can be at the outer limits of the melody. What really matters is the required range of the melody, and you'll have to work out a suitable key - in regards to the singers' expected range - from there.
1 If most of the important parts of the melody is in the upper end of this range you should probably aim for a key a couple of notes lower, and vice versa, in order to have the important parts not sound strained.
2 Aside of voice quality, musically useful is also subject to conditions regarding required voice loudness, such as if there are instruments playing that the singers need to be heard over, and/or if microphones are used.
For my answer I will assume that you are intending to work with untrained voices since you want the greatest amount of participation.
An untrained voice typically has about an octave range of good, usable tone production. You won't be able to please everyone - some will probably switch octaves when it is comfortable for them to do so.
As a good rule of thumb, the key of "F Major" is generally friendly for untrained voices and will give the widest range for chord voicing possibilities for untrained voices. However, you're working in unison so that added benefit doesn't really apply. "C", "D", and "G" are all good keys too - particularly the first two if you keep the melody in check.
Apart from the above suggestions, here is another rule of thumb:
Hopefully the melody you're working with isn't too snake-like :)