A wireless sensor network is a collection of tiny, autonomously powered devices - commonly called sensor nodes - endowed with sensing, communication, and processing capabilities. Once deployed over a region of interest, sensor nodes can collect fine-grained measurements of physical variables, like the temperature of a glacier or the concentration of a pollutant. To report their readings to one or more data sinks, sensor nodes communicate using their integrated radio-transceivers and build an ad-hoc - possibly multi-hop - relay network. Thanks to the potentially large number of nodes they are composed of and their ability to operate unattended for long periods of time, wireless sensor networks allow monitoring the environment at an unprecedented spatial and temporal scale. However, enabling a wireless sensor network to reliably report large quantities of data over long periods of time is still a challenging goal. In particular, since the operation of the radio is known to be the major factor of energy consumption on sensor nodes, limiting communication is crucial for increasing the lifetime of the network. On the other hand, meeting the requirements of wireless sensor network applications may require sensor nodes to collect and report large amounts of sensor readings. The efficient operation of a wireless sensor network thus requires careful scheduling of node participation in sensing and communication. Beyond the role that medium access control and routing protocols may play in this context, so-called sensor selection algorithms can provide for significant communication savings by identifying subsets of the deployed nodes that are still able to comply with the application requirements. This thesis argues for endowing sensor selection algorithms with the ability to dynamically adapt to the observed data and the local topology of the network. It offers novel sensor selection strategies that can continuously tune their parameters in a distributed fashion, thereby relying on no or only little a priori knowledge about the phenomena of interest. In particular, the thesis first addresses the sensor selection problem in the time domain by considering scenarios in which sensor nodes autonomously adapt their data reporting rate. To this end, nodes report their sensor readings along with a forecasting model, which the sink can in turn use to estimate future readings. Nodes can thus suppress data communication as long as the estimation error at the sink does not grow beyond a pre-specified, application-dependent threshold. Since the choice of a proper forecasting model is instrumental in allowing for high communication savings, this thesis proposes a generic and lightweight procedure to perform adaptive model selection on sensor nodes. The proposed algorithm concurrently maintains and evaluates the performance of a set of models on the nodes and lets them report to the sink the model with the lowest expected communication overhead. Second, the thesis addresses the sensor selection problem in the spatial domain, in particular for applications requiring spatial coverage of a region of interest. It proposes a novel sensor ranking strategy to efficiently schedule the activation of sensor nodes across the deployment region. Information about the local network topology is used to determine the actual relevance of a node for the current sensing task. The resulting ranking of the nodes, properly combined with randomization techniques, is then used to select subsets of nodes whose activation can guarantee compliance with specific application requirements. The sensor selection strategies proposed in this thesis require little memory and computational resources, and are thus implementable on resource-constrained wireless sensor network platforms. Their practical feasibility is evaluated by means of simulations and experiments on a small-scale deployment in the context of a concrete application scenario, namely the monitoring of noise pollution levels in urban environments. The contribution of this thesis is therefore threefold: it describes the design of novel temporal and spatial sensor selection algorithms; it provides an implementation of these algorithms on simulators and state-of-the-art wireless sensor network platforms; and it describes a thorough performance evaluation based on simulations, real-world experiments, and a specific application scenario. Taken together, these contributions constitute an additional step towards enabling long-term environmental monitoring applications using wireless sensor networks.