I took out an unbaked apple pie from the freezer, thawed it out and baked it. I was wondering if I could refreeze it now.
You could, but it will not be "as" good.
Freezing and thawing destroy cell wall structure; making food "mushy" (*).
When freezing, water turn to ice, and when freezing slowly, large ice crystals are formed and will break the cells wall. (and ice is take more volume than liquid water)
To reduce the risk of damaging the food when freezing/thawing, is to freeze as fast as possible (as cold as you can) and thawing as slowly as possible.