Distinct from wireless ad hoc networks, wireless sensor networks are data-centric, application-oriented, collaborative, and energy-constrained in nature. In this paper, we formulate the problem of data transport in sensor networks as an optimization problem, with the objective of maximizing the amount of information (utility) collected at sinks, subject to both the channel band-width and energy constraints. We then devise a distributed solution of the convex optimization problem, and explore in three directions. First, we devise a simple node capacity estimation method to online measure the node capacity. Second, we linearize the energy constraint by properly setting the value of the system lifetime in advance and controlling the data rate of a node so as to sustain its battery lifetime longer than the specified lifetime. Finally, we incorporate the optimization results into routing so as to provide sensors with opportunities to select better routes. The simulation results show that the utility-based approach balances between system utility and system lifetime.