His style is that of the late Spanish baroque, pre-classical, and classical periods, with frequent reference to Guatemalan folk music idioms.
In 1740, the young Rafael signed a composition for voice and basso continuo, on the Latin text of the Second Lamentation of Jeremiah.
Castellanos remained loyal to the Archbishop, Pedro Cortés y Larraz, and only left with his musicians, the clergy, and the religious orders when they were forced to do so, arriving at the new site in November 1779.
Among his pupils, several became able composers, such as Manuel Silvestre Pellegeros and Pedro Nolasco Estrada Aristondo, his eventual successor as maestro de capilla.
All of his output is vocal, with villancicos and cantatas for different feasts of the Catholic liturgical calendar, as well as sacred works on Latin texts.