A hydrogen-bonded organic framework is an effective photocatalyst for producing hydrogen from water. Its crystal structure is key to its activity; a chemically identical, amorphous version is almost inactive, as rationalized by crystal structure prediction.