If you're using bash ≥4 or zsh, you can make the shell do recursive globbing: the ** wildcard matches directories at any depth. In bash, you need to enable the feature with shopt -s globstar (in zsh, it's always enabled).
for x in **/*.txt; do …
If you need your script to be portable to other shells, use the find command, it's exactly the right tool for the job. Note that find is an external command that can work in two ways: it can generate a list of files, and it can execute commands for each file. If you want to execute a command for each file, use -exec:
find . -type f -name '*.txt' -exec chmod a+r {} +