If the piece's time signature is 4/4, and its shortest note is sixteenth. Should I set the metronome the same speed as sixteenth note, or quarter note? Why?
In general, setting the metronome to sixteenth notes for a typical piece will only be useful when you are trying to figure out an intricate rhythm in ultra-slow motion. Once you move from the "figure-out" to the "actually practise in style" phase, you'll very likely want to use the "denominator of the time signature", like 4 in 2/4, 3/4, 4/4 beats or 2 in 2/2 beats. For some rhythms, it makes sense to go even coarser, like 2 beats per 6/8 measure or 1 beat per 3/4 measure (Viennese Waltz).
It may be helpful to use a "drum pattern" from an arranger rather than a metronome when available: those offer finer subdivisions for orientation without losing the "big picture" like a metronome does.
It depends on what you're trying to accomplish. If I'm trying to work on accuracy in sixteenth notes, I set the metronome to a sixteenth note (or eighth notes). If I'm trying to work on the bigger flow of the piece, I set it to quarter notes. Sometimes I turn the metronome off (or to a very slow setting) and work on the "big" beat (i.e. each measure).
The metronome is a tool to help you improve the accuracy of your timing, and you should use it in whatever ways help you best.
If the time signature is 4/4 that tells you that a quarter note gets one beat and that there are 4 beats to a measure. If the time signature was 3/4 that tells you that a quarter note (indicated by the second half of the time signature) gets one beat and there are 3 beats per measure.
If the time signature is 6/8 then that tells us that an eighth note gets one beat and there are 6 of those beats per measure.
So if you simply want to follow the meter designated by the composer, then you would set your metronome to the same speed as the note that gets one beat as prescribed in the time signature. In 4/4 time that note is a quarter note.
So if the time signature is 4/4 and the tempo is marked as ♩ = 60, then you would normally set the metronome to 60.
Sometimes for practice purposes, you might set the metronome to a slower speed that will permit you to play the piece accurately during practice. Start with a speed that allows you to quickly get to 100% accuracy and then gradually increase the speed until you get to full tempo.
There may be other situations involving practicing the piece where you might use a different setting on the metronome. If it helps you learn the piece to practice it with the metronome set to twice the indicated speed (eight note gets one beat and each measure has eight beats), then I suppose you could try that as a learning tool.
But the short answer to your question is that common protocol would indicate setting the metronome so that the beat is equal to the tempo prescribed for a quarter note in 4/4 time.