Yes you can. In the early days of alternate energy you could if you produced more than you needed. Companies got wise to that and made it where you can, but the equipment a person has to buy to tap in end the hoops a producer has to jump through is not worth it.
Not only that but the electric company sells it to you at retail and buys it back wholesale.