I'm amazed at how often non-hikers have asked me "what's the perfect hiking temperature"? How odd. Anyway, to answer the question, I start with disclaimers: I'm assuming it's overcast and calm, so there's no heat benefit from the sun and no detriment from the wind. And I assume a hike where there's no specific strategic benefit to temperature, so only comfort is a consideration. At which point the person who posed the question mutters "damn, Chip always turns a simple question into something complicated"
I'm thinking about 50-ish. Warm enough that I don't really need hat and gloves, but cool enough that I can comfortably cover all skin for protection from poison oak, bugs, etc, without over heating. If trail hiking, add a few degrees, maybe 55. Anything over 60 is starting to get uncomfortable. On the low end, it starts getting less fun if it dips into the teens, especially on an all-day hike where cold starts to wear you down.