A small amount of Xbox Insider Program users have reported the digital option of "gifting" games to friends in what appears to soon be a widespread feature to users. Similar to Steam's gifting option, a person will be asked when buying whether or not this game is a gift to a friend or not. If so, the recipient will then get a game code sent to their Gamertag or email address that they can use to redeem their gifted game.
All I can say is, it's about time. Gifting on consoles is something that should've been done a long time ago and the only reason I can think of as to why it took so long is that there isn't much demand for it. After all, how many of us purchase games for our friends? Will you be sending a game a friend's way sometime soon?