In this paper, we consider a collaborative sensing scenario where sensing nodes are powered by energy harvested from ambient environment. In each time slot, an active sensor consumes one unit amount of energy to take an observation and transmit it back to a fusion center (FC). After receiving observations from all of the active sensors in a time slot, the FC aims to extract information from them. We assume that the sensing utility generated by the observations is a concave function of the number of the active sensing nodes in that slot. Our objective is to develop a sensing scheduling policy so that the time average utility generated by the sensors is maximized. We first consider an offline setting, where the energy harvesting profile over duration [0, T − 1] for each sensor is known beforehand. Assuming infinite battery capacity at sensors, we show that the optimal scheduling structure has a "majorization" property, and propose a procedure to construct a collaborative sensing policy with the identified structure explicitly. We then consider an online setting, under which the energy harvesting profile is available causally. Assuming the energy harvesting processes at individual sensors are independent but not necessarily identical Bernoulli processes, we show that the expected long-term time average sensing utility has an upper bound under any feasible scheduling policy satisfying the energy causality constraints. We then propose a randomized myopic policy, which aims to select a number of sensors with the highest energy levels to perform the sensing task in each slot. We show that the time average utility generated under the proposed policy converges to the upper bound almost surely as time T approaches infinity, thus it is optimal. The corresponding convergence rate is also explicitly characterized.