General federal law: You can lend an unregistered, legal firearm to another person if you know, or reasonably believe, the other person is not "prohibited" from possessing firearms; and you don't believe the other person intends to use the gun to commit a crime.
Some states require that transfers of some firearms between some categories of persons be conducted through an FFL, who runs an "instant" background check to verify that the recipient is not a Prohibited Person. These requirements are subject to frequent changes due to both legislation and reinterpretation by rule-making agencies. If in doubt, consult an FFL in the recipient's state. (I.e., a transfer made through an FFL is always legal, though not always necessary.)
Registered "NFA" firearms are less common, and anyone who has gone to the trouble to acquire one is likely to know the restrictions that govern those. AFAIK, the only way those can be left in the hands of another person is if one or more of the following is satisfied:
The recipient is a member of the entity to which the NFA item is registered.
The recipient is authorized by a qualified law enforcement or other government agency to receive and possess NFA items.
The recipient gets some special dispensation from the BATFE to possess the item for a particular purpose.