The sentence I hope you had a good trip is correct and usable in written English. You can use it when you are expressing your hope that someone had a pleasant experience while traveling. For example, you might say, I hope you had a good trip to the beach last week. How was it?.