The role of nuclear fragmentation in particle therapy and space radiation protection