It comes from the Tagalog word "bundok", which means "mountain". The plural form of this word is "bundukan", which means "mountainous region".
American soldiers stationed in the Philippines during the early 20th century adopted the word "boondocks" to refer to the remote, mountainous, and often undeveloped areas of the country. From there, it spread into American English as a general term for any remote or isolated area.