I think riddles and puzzles are fine so long as they serve to gate SIDE CONTENT, if the distinction makes sense (and I know there's no such thing for some styles of ultra-sandbox play).
It's whenever the players main goals are stalled by them that they become a problem, in my experience.