The current practice in wireless sensor networks (WSNs) is to develop functional system designs and protocols for information extraction using intuition and heuristics, and validate them through simulations and implementations. We address the need for a complementary formal methodology by developing nonlinear optimization models of static WSN that yield fundamental performance bounds and optimal designs. We present models both for maximizing the total information gathered subject to energy constraints (on sensing, transmission, and reception), and for minimizing the energy usage subject to information constraints. Other constraints in these models correspond to fairness and channel capacity (assuming noise but no interference). We also discuss extensions of these models that can handle data aggregation, interference, and even node mobility. We present results and illustrations from computational experiments using these models that show how the optimal solution varies as a function of the energy/information constraints, network size, fairness constraints, and reception power. We also compare the performance of some simple heuristics with respect to the optimal solutions.