Hi Akhila!
It depends what you are trying to say.
"Who ate my sandwich?" is simple past tense. In this example, you are talking about an action that is in the past; it happened and it is done.
"Who has eaten my sandwich?" is perfect present tense. In this example, you are talking about an action that happened in the near past, but has a connection to
the present.
I would use the present perfect tense "has eaten" because the past action has a connection to the present. Your sandwich was eaten and now you don't have a lunch to eat.