Watson discovered the structure of DNA when he was 24. Heisenberg formulated the uncertainty principle when he was 25. Newton claimed to have developed his gravitational theory when he was 24. Darwin embarked on the Beagle when he was 22.
I could go on for hours like this.
But wait. Crick was 37 when he discovered the structure of DNA. Schroedinger was 38 when he published on wave mechanics. Newton cast his gravitational theory in mathematical form when he was 37, his earlier insights likely being purely speculative. Darwin finalized the theory of selection when he was 47 (Wallace being 33 at the time.)
Of course I may be biased here. Ever so many examples and counterexamples don't prove a point. One has to look at the data that's out there.
Falagas et al. (2008) ask "At what age do biomedical scientists do their best work?" and answer with the following age histogram of the top 5 highly cited articles for a random subset of 300 bioscientists:
(The corresponding histogram for the single-most cited paper looks noisier, propably based on people's tendency to cite summary reviews written in later years.)
Costas et al. (2010) perform a more thorough analysis for scientists working at the Spanish National Research Council. Their results indicate that while the number of publications per scientist per year increases somewhat with age, the expected number of citations per publication decreases. However, their study lumps together all age groups younger than forty. (Top, Low, and Medium refer to three performance classes of researchers).
Finally, the widely cited and awesomely titled Kanazawa (2003) "Why productivity fades with age: The crime–genius connection" examines the age at what 280 famous scientists made their single key contribution to science:
Quite depressing overall, but it seems you don't have to go fishing before you turn 40 (Einstein was 41 in 1920). At 34, chances are 50:50 that the best of your work still lies ahead. Even better (or worse, depending on your personal situation), the corresponding curve for the 72 scientists in Kanazawa's dataset who never married looks significantly different:
(This might be somewhat confounded by the unknown fraction of (closet) gay scientists in the sample.) Newton, Erdös, Tesla (and Anton Bruckner) immediately come to my mind as straight men who denied themselves the pleasures of female company, and were productive well into their forties, or later. (The catch being that Tesla and Newton became funny at around 50; Erdös was born that way; and Bruckner, well, that depends on your opinion on watertight underwear.) Crick, Schroedinger and Darwin were all married.
Falagas, M. E., Ierodiakonou, V. and Alexiou, V.G. (2008): At what age do biomedical scientists do their best work? The FASEB Journal 22,12 4067-4070
Costas, R, Van Leeuwen, T.N., Bordons, M (2010): A bibliometric classificatory approach for the study and assessment of research performance at the individual level: The effects of age on productivity and impact. J ournal of the American Society for Information Science and Technology 61, 8 1564–1581