(I'm not sure exactly why you'd want this, but...) You can get a random culture by using CultureInfo.GetCultures, then randomly selecting from the results:
var allCultures = CultureInfo.GetCultures(CultureTypes.AllCultures);
var random = new Random();
int index = random.Next(0, allCultures.Length);
var culture = allCultures[index];
string twoLetterCode = culture.TwoLetterISOLanguageName;
Note that this doesn't take into account that there are not an even number of cultures with the same 2 letter codes. This will randomly pick amongst all cultures, but not evenly through the 2 letter codes. If you want a more random distribution there, you could use:
var uniqueCultureCodes = CultureInfo.GetCultures(CultureTypes.AllCultures)
.Select(c => c.TwoLetterISOLanguageName)
.Distinct()
.ToList();
var random = new Random();
int index = random.Next(0, uniqueCultureCodes.Count);
string twoLetterCode = uniqueCultureCodes[index];
This creates the distinct list of two letter codes, then randomly picks from them.
Edit: If your goal is merely to create a CultureInfo
given a two letter code such as "en" or "fr", you can do:
CultureInfo culture = new CultureInfo("en");