As Tarheel suggested, context would dictate which one is appropriate. They are both grammatically correct. The simple answer to your question is that the first sentence uses the simple past and the second uses the present perfect.
If you have a question about the English language and would like to ask one of our many English teachers and language experts, please click the button below to let us know: