With the promises of smart grids, power can be more efficiently and reliably generated, transmitted, and consumed over conventional electricity systems. Through the two-way flow of information between suppliers and consumers, the grids can also adapt more readily to the increased penetration of renewable energy sources and encourage users' participation in energy savings and cooperation through the demand-response (DR) mechanism. An important issue in smart grids is therefore how to manage DR to reduce peak electricity load and hence future investment in thermal generations and transmission networks, and better utilize renewable energies to reduce our dependence on hydrocarbon. Effective DR depends critically on demand management and price/load/renewable energy forecasting, which call for sophisticated signal processing and optimization techniques. The objectives of this article are to: 1) introduce to the signal processing community the concept of smart grids, especially on the problems of price/load forecasting and DR management (DRM) and optimization, 2) highlight related signal processing applications and state-of-the-art methodologies, and 3) share the authors' research experience through concrete examples on price predictions and DRM and optimization, with emphasis on recursive online solutions and future challenges.