Both of these are the most popular English language tests widely accepted across the world. Though they do have some major differences, strengths, and weaknesses.
Nevertheless, perhaps the most important criteria when choosing is to know in which country you want to study, work, etc. If your choice is a US institution, TOEFL is ideal, although IELTS is also accepted. If you choose a country that belongs to the United Kingdom, or Canada, or Australia - IELTS exam is the one.