While ultimately choosing a keyboard for programming is about what feels best, there are important factors to consider when making that decision. Things to consider include layout, size, durability, type of key used and even customizability.
An important thing to know is the difference between a mechanical keyboard and the typical rubber dome keyboards most commonly used. Mechanical keyboards have a physical switch for each key that operates as shown in the following gif:
The main advantages of a mechanical keyboard are:
Feel - Unlike the typical rubber dome switches found in the majority of keyboards, mechanical keyboards register the key press without you having to press the key all the way down (bottoming out). This makes for a great typing feel as you're not constantly pressing down into a bottom of the keyboard.
Customizability -There are many switch-types to choose from including Reds, Blues, Browns, Black, Clears, Whites, Greens, Topre, Buckling Spring, ALPS. For example, Greens and Blacks have high actuation force while Reds and Blues have low actuation force. This is a great guide for selecting a key type.
Durability - Cherry MX switches are rated for over 50M activations.
For a more complete guide of all the factors you should be aware of when buying a mechanical keyboard, go here.