We consider a pair of energy harvesting devices, whose state at any given time is determined by the energy level and an importance value, associated to the transmission of a data packet to the receiver at that particular time. Under the assumption of a central controller with information on the energy level and packet importance of both nodes, we consider the problem of optimizing the transmission strategy of the two nodes over a shared wireless channel, with the goal of maximizing the long-term average importance of the transmitted data. Under the assumption of i.i.d. Bernoulli energy arrivals and a collision channel model, we show the optimality of threshold policies with respect to the data importance level, i.e., the sensor nodes should report only data with an importance value above a given threshold. We provide numerical results to evaluate the impact on the performance of factors such as the battery capacity size and the energy harvesting rate, as well as the interaction between the two nodes.