While no one recommends selecting a specialty based on salary, it is one piece of data that medical students typically ask about. As seen below, physicians are paid quite well no matter what their field. However, specialists tend to make more than primary care physicians on average (specialists generally also require many more years of residency training than primary care physicians). It is important to note, though, that there are many cases of primary care physicians in ideal locations with excellent business practices earning significantly more than many specialists.
Bottom line: Specialize in a field that you find interesting and enjoyable. Don't worry about how much you'll be making; you'll be fine no matter what you choose.