Characterization of the critical values of branching random walks on weighted graphs through infinite-type branching processes