There are lots of reasons for a dry spell. Once one gets past the obvious ones (sin, lack of effort, depression, etc.), there remains the somewhat mysterious process by which God weans us away from spiritual consolation as we mature spiritually. A great contemporary book on this is “When the Well Runs Dry: Prayer Beyond the Beginnings” by Thomas Green, SJ:
amazon.com/When-Well-Runs-Dry-Beginnings/dp/1594711372/ref=sr_1_1?ie=UTF8&s=books&qid=1250883169&sr=1-1
A real classic, very readable. What makes spiritual desolation so very difficult for many devout Christians is that despite their best efforts to maintain a close relationship with God, God at times seems distant. Thomas Merton, OCSO, for example, said in his wonderful book “New Seeds of Contemplation,” “Prayer and love are really learned in the hour when prayer becomes impossible and your heart turns to stone.”
If the desolation continues or becomes unbearable, spiritual direction can be very helpful.