Both are grammatically correct, but (2) makes more sense when the sentence is isolated as it is now. (1) requires some more context in order to be absolutely correct.
The reason is that (1) is in the
past perfect tense, which is used when you are describing two or more actions that were completed in the past, and one of them was completed before the other(s). For example, the past perfect tense would be appropriate if you said, "I stopped by their house hoping to see them, but they had gone for a trip." However, when the sentence stands alone as it does in (1), there is only one action being described and no other action with which to compare it; hence there is no obvious need for the past perfect tense.
The simple past, on the other hand, merely indicates that an action has already been completed. It requires no other action with which to compare it, so it can stand alone. Thus, (2) makes sense as is.