There's some logic it to it, Great prophets get the next religious tech and so on. In the late game in seems to be fairly random though. There doesn't seem to be any list of which techs fall into which catergory, unless it's buried in the murky depths of the civlopedia.