No. Wearing a hat does not cause hair loss, and will not affect your transplanted hair in any way.