One of the main goals in this paper is to establish convolution sums of functions for the divisor sums $\widetilde{\sigma}_s(n)=\sum_{d|n}(-1)^{d-1}d^s$ and $\widehat{\sigma}_s(n)=\sum_{d|n}(-1)^{\frac{n}{d}-1}d^s$, for certain $s$, which were first defined by Glaisher. We first introduce three functions $\mathcal{P}(q)$, $\mathcal{E}(q)$, and $\mathcal{Q}(q)$ related to $\widetilde{\sigma}(n)$, $\widehat{\sigma}(n)$, and $\widetilde{\sigma}_3(n)$, respectively, and then we evaluate them in terms of two parameters $x$ and $z$ in Ramanujan's theory of elliptic functions. Using these formulas, we derive some identities from which we can deduce convolution sum identities. We discuss some formulae for determining $r_s(n)$ and $\delta_s(n)$, $s=4,$ $8$, in terms of $\widetilde{\sigma}(n)$, $\widehat{\sigma}(n)$, and $\widetilde{\sigma}_3(n)$, where $r_s(n)$ denotes the number of representations of $n$ as a sum of $s$ squares and $\delta_s(n)$ denotes the number of representations of $n$ as a sum of $s$ triangular numbers. Finally, we find some partition congruences by using the notion of colored partitions.