There are currently 5 states that offer legal online poker for real money in the United States New Jersey, Nevada, Pennsylvania, Michigan, and Delaware.
Fortunately, in Penal Code Sec. 337j(e)(2)(D) we're told that games played with cards in a private home where no one profits from the running of the game are 100% fine. So yes, since online poker is played at home with the only gains being your winnings, it's perfectly legal.