A molecular tree is defined as a tree in which no vertex has degree exceeding 4. Consider such a tree \( T \) with edge set \( E \). For each vertex \( u \) in \( T \), let \( d(u) \) represent its degree. In this paper, we study a class of molecular descriptors defined by \[ \mathcal{B}_f(T) = \sum_{uv \in E} f(d(u), d(v)), \] where \( f \) is a symmetric real-valued function that depends on the degrees of adjacent vertices in \( T \). The primary aim of this work is to identify those graphs, in the class of all molecular trees of a given order and admitting a perfect matching, that attain extremum (i.e., minimum or maximum) values of the index \( \mathcal{B}_f \), under certain assumptions imposed on the function \( f \). As an application of one of the main results, graphs that maximize the Sombor index and Euler-Sombor index (along with their reduced versions) as well as the reciprocal sum-connectivity index, cubic Sombor index and Platt-Sombor index are characterized over the aforementioned class of molecular trees.