You can legally sell a firearm you own to anyone of the proper age. You have to do due diligence, though because if they are a felon or someone who isn't allowed to own one, you can end up in hot water.
To go a bit further, if you're constantly buying and selling guns with the obvious intent of making a profit or living from it, the ATF will probably come knocking at your door (and not politely either). They consider this to be "engaging in the business." However, if you occasionally sell a gun or two over your lifetime to another private owner you're fine.
Also, Baron is correct about selling to people who are legally not allowed to own one. However, this is within reason as well. For instance, if I sell a gun to a guy at a gunshow and obviously did not know him previously then you're pretty much in the clear. However, if your best friend is a felon and you sell him a gun, you really can't say "oh I didn't know he wasn't supposed to have one!"
Of course the law varies from state to state.