What is it about this music that gives it this distinctive, familiar sound?
The tune that forms the basis of the piece was written as a hymn tune. Vaughan Williams used that tune in the English Hymnal in 1906. He even orchestrated the piece to resemble an organ:
The work is scored for an expanded string orchestra divided into three parts: orchestra I, a full-sized string orchestra; orchestra II, a single desk from each section (ideally placed apart from Orchestra I); and a string quartet. Vaughan Williams made this configuration resemble an organ in sound, with the quartet representing the swell division, orchestra II the choir division, and orchestra I the great division. The score specifies that the second orchestra should be placed apart from the first. This spacing emphasizes, on several occasions, the way that the second orchestra echoes the first orchestra.
It is clear, therefore, that Vaughan Williams intended for the piece to sound religious.
Hymn tunes, especially those written in the renaissance, tend to share certain characteristics. The melodies tend to follow a similar profile, beginning on the tonic pitch, then rising and eventually falling back to the same pitch.
Notably, renaissance hymn tunes are modal. This tune is in the Phrygian mode, which is probably the mode least like the modern major and minor modes on account of its lowered second degree. This contributes to the distinctiveness of the impression it creates.
I also wonder since Vaughan Williams composed that piece before there were films, ...
It was actually composed in 1910, after motion pictures were invented, but before they had sound.
...how is it that the music "found" that perfect fit in the visual genre of films?
Religious-sounding film music sounds religious because it is based on religious music, whether on specific pieces or merely certain stylistic elements. The Fantasia on a Theme by Thomas Tallis is also based on religious music, both in terms of the specific melody and certain stylistic elements, and it is clear that Vaughan Williams intended for the piece to evoke its religious heritage. It is therefore not surprising that later film music reminds one of that piece.
Furthermore, many film composers writing music for religious scenes are probably familiar with the piece and in some cases they may be unconsciously influenced by it, or they may even make a conscious effort to emulate it.
In at least one movie, they used it directly.