Tilley T3 in cotton duck has been my standard headgear for twenty-odd years. They stand by their guarantee and the hats are superb for the outdoors. I do have a few other Tilley styles, including a lightweight synthetic one, a T1 bucket style and a wool cap, but the T3 remains the most versatile.
Others suggested that I'd find a peaked cap essential when hiking (baseball or trucker style), but I can't say I've been impressed. Keeps the rain off your face but they're ugly things and offer little in the way of weather protection. Much more useful - and stylish! - is a beret. Try a largish model,
impermeable to keep the elements at bay, which you can reshape as needed to fend off the sun and rain.
There's a very informative website here offering a huge range, but the brave will find the Basque
txapeldun gives the best coverage, and will surely receive the most admiring comments...