Some beers have taste different on Nitro vs CO2. I'm sure there is science behind this. Why choose one over the other?
In general, nitrogenation imparts a creamier, smoother texture to a beer. The bubbles are smaller in size than CO2 bubbles, and the reduced solubility results in a thicker beverage, which is both delicious, and results in that visually appealing 'cascade' effect.
Also, you can do this with a Nitro beer. And that's awesome.
CO2 is the traditional way of serving beer. The keg is filled with CO2 in order to push the beer into the tap. Since all beer contains CO2, pressurizing the keg will maintain the natural carbonization of the beer as it is being served. The amount of CO2 that the beer already has needs to be taken into account because nobody likes their beer too foamy or too flat.
Nitro dispensing is a newer method. In this case, N2 is used under high pressure either instead of or with the CO2. It replaces some of the natural CO2 in the beer, which results in a creamy flavor as well as a thick, tight foam on the top. Some beer "purists" regard the process as being unnatural because it really messes with the flavor of the beer. An example of a beer that uses Nitro is Guinness. When you open a can of Guinness, a nitrogen "ball" activates to carbonate the beer.
Just wanted to add to some of the already great answers…
Although it has been mentioned what the characteristics of Nitro are, and why that might be good for the beer drinking experience, it hasn't really been said why to use it or rather why its used in lieu of CO2.
It was mentioned that the historical carbonation process was very different, but nobody has connected the two, so I figure I'll add a little input to hopefully color in a bit more. A lot of the reason for carbonation is to preserve the beer. By replacing the oxygen in the keg the beer will last longer. Now we associate the carbonation with beer but that was not always there traditionally. While it is true that older beer bottled from barrel storage was carbonated during bottling it wasn't mentioned that historically beer was poured from the cask and therefore not carbonated beyond natural carbonation.
In this string cask beer wasn't mentioned but it is literally from the barrel. It is the smoothest and creamiest way to "tap" beer. It's also considered the best by many purists. It however has a huge limitation in modern applications. The barrels don't last as long and thereby need to be smaller, swapped out more often, and potentially wasted if not used quick enough. For this reason most businesses opt for the larger, easier, cheaper carbonated kegs.
As stated before by Jeffrey Lin the Nitro is a newer solution but I have to take exception to his explanation of the unnatural side of Nitro. Really the purists are fine with nitro. They may not be particularly fond of the "in-can" nitro widget, but really the process just replaces a larger CO2 bubble with the smaller finer bubbles of dissolved nitrogen and thereby some dissolved C02 as well. Purists truly would be more likely to enjoy a cask pour but as Nitro, in a lot of ways, is closer to cask both in consistency and the "creaminess" described it goes without saying this would be enjoyed by the purists as well.
Types of Beer for Nitro
There are many types of beer where smooth finer bubbles are appropriate. Guinness being only one that comes to mind but really most British milds. Also English ales, pales and creams just to mention a few. The older styles from England were flat compared to American lagers and most modern beers. Another good example is a Boddingtons. Finer bubbles fit the mold with anything that traditionally would be served from the cask.
As with most new technology it serves a purpose and in this case the purpose is two-fold. Store without oxygen to prevent going bad, and keep with the original intended style of those types of beers. The discussion of flavor change is slightly off because flavor change would only be present if oxygen were allowed to be present in the beer when kegged. Texture change is more accurate and the nitro is an effort to more closely approximate that.
Hope that is helpful to fill in some details and thanks to Sloloem for helping, hopefully it is more easily digestable/readable? It may not be science but historically speaking it might be philosophy…