Clamp diode to a solenoid activated by a raspbery pi, how do I choose it?
A guideline is that the diode must be able to handle the current drawn by the solenoid. If your solenoid draws less than 1A an 1N400x will do fine.

Note that you use a darlington (often a good idea because the RaPi can supply only a small current and a darlington has a high current gain) but the maximum base-emitter on voltage of a TIP121 can be 2.5V, which leaves only ~ 0.5V for R1 (assuming a high output of 3V from the RaPi, not unreasonable as a first guess). A value of 4.7K will result in 0.1mA base current. With the minimum gain of 1000 this will support only 100mA collector current. If you solenoid draws less, fine. If it draws more you must lower R1 accordingly, but you will have to check what current the RaPi can supply, and how much its output voltage will drop at that current.