R enewable energy generation at the point of consumption (i.e., distributed generation) reduces consumer's electricity expenditure, and eliminates the cost, complexity, and inefficiency associated with power transmission and distribution. In this study, we address the problem of how a consumer should invest in distributed renewable generation to minimize the total expected cost of meeting his electricity demand. In contrast to the existing literature that focuses on grid-connected, large-scale investments in renewable power generation in the wholesale electricity market, we address investment in stand-alone, distributed renewable energy by an individual consumer who participates in a regulated, retail electricity market. We formulate an infinite-horizon, continuous-time model in which the utility moves first, and announces a retail electricity rate. Each consumer then acts strategically in deciding if, when, and how much distributed generation capacity to install. We find the subgame-perfect Nash equilibrium of this dynamic Stackelberg game by first deriving the consumer's optimal investment time and the resulting optimal capacity of his installed distributed generation. Using those results, we quantify the ensuing cost savings to the consumer, which average over 22% across a range of model parameters. Next, we evaluate the impact of consumer's investment in renewable energy on the revenue of his electric utility, and arrive at the structure of the pricing policy that maximizes that revenue. We quantify the revenue increase available to the utility from following this revenue-maximizing pricing when serving either a single consumer or multiple heterogeneous consumers, and find that it averages over 10% in our numerical studies.