The Desert Spirit Lamp is a decorative furniture item and crafting material. It must be placed on a platform or other flat-surface item. It has a 2.5*1/40 (2.5%) chance of being dropped from Desert Spirits, which can be encountered in the Corrupted or CrimsonUnderground Desert. However, the Desert Spirit will only drop one of its special drops at a time (i.e. it may drop either the Desert Spirit Lamp or the Djinn's Curse, but never both). It will first attempt to drop the Desert Spirit Lamp, and if it fails to do so, it will attempt to drop the Djinn's Curse.[1]
↑Information taken from the Desktop1.4.3.2 source code, method RegisterMiscDrops() in Terraria.GameContent.ItemDropRules.ItemDropDatabase.cs. There may be inaccuracies, as the current Desktop version is 1.4.3.6.