In general, you should not wear a hat or fashion head covering in your application photo.
Your face, eyes, and facial features must be clearly visible. If a hat covers your face or creates shadows, the photo may not meet the requirements.
A head covering may be accepted if it is worn for religious or medical reasons, but your full face must still be clearly visible.
If your photo does not meet the rules, your application may be delayed or rejected. Before applying, it is safer to prepare a clear photo without a hat for your UK ETA.