There are both historical actors as well as structural factors responsible for the fall of the mughals.
The primary structural factor is the Jagirdari crisis.
The mughal empire basically ran on a vast patron client network with the emperor as the supreme patron.The nobility were loyal to the centre in return for jagirs(estates) given to them and recieved a significant part of the revenues of these jagirs with which to sustain themselves and provide upkeep for their followers.This system worked well when the empire was expanding,lots of land available and number of nobility was small.But as the noble households multiplied through birth and through incorporation of local elites(for stability) the amount of available jagirs were drying up,leading to great infighting and personal insecurity among mughal elites for jagirs.This was because even though their numbers were increasing,number of profitable jagirs were more or less static.But to maintain their status among the elite a nobleman had to maintain a certain level of lifestyle which wasnt possible with poorer frontier area jagirs or with no jagirs.This led to secondary problems.
Land revenue was the main source of income of the state.While akbar and his land revenue minister raja todarmal had laid down an efficient land survey and collection system.But this system was not updated with proper regional surveys by shahjahan,jahangir or aurangzeb who rested on the laurels of akbar.The increasing commercialization of agriculture(where land revenue was now collected in cash,rather than crop) led to rise of agrarian middlemen and further distortions.These distortions were not properly corrected leading to revenue shortfalls.Instead of dealing with this critical administrative problem which became acute from midway into shahjahans' reign,mughals spent huge sums on luxury,monument building,succession wars and wild far flung campaigns such as shajahan to central asia,aurangzeb to deccan and assam.
Now with land revenue system already in disarray what jagirdari crisis did was now the jagirdars who recieved ever small jagirs or were unsure how long they would hold on to one became downright oppressive on the peasantry.The general mughal philosophy of land taxation was leave the peasants just enough income to provide sustenance for him and his family,and provide a small social surplus(so he can perform yearly festivals,weddings etc).The desperate and greedy jagirdars first started eating into the social surplus and then into their very sustenance.This combined with religious instability of aurangzeb's late years created a volatile situation among the peasant communities and created amongst them a feeling that mughals were after their religion and their lives.Thus the peasantry which was earlier aloof from power games of delhi now became enemies of the mughal state.Hence we see a fusion of religious and agrarian protest revolts in this time amongst primarily agricultural communities of punjab and doab.Thus we see beginning of people's war among the jats,sikhs,satnamis,bundelas.
The other thing was jagirdari crisis reduced the efficiency of mughal army.With the revenue from jagirs the jagirdars were supposed to maintain a certain number of armed soldiers for local policing and central service.Once their purses felt the pinch,the jagirdars began to reduce the actual number of paid and equipped soldiers they and under them.Instead on inspection days they would hire locals ,dress them up in their retinue and thus show they had the prescribed amount of soldiers under their command while in reality the actual soldiers were far less to save money for their personal lifestyle.
2nd structural factor was decline in mughal army's relative strength.The mughal empire in final analysis depended on military strength for survival.The primary reason why mughals were successful at establishing their empire was 1.Horse archery 2.Near monopoly on gunpowder weapons and 3.(After conquest of fertile northern plains and their revenue) Sheer weight of numbers.
Horse archery by the time of aurangzeb was slowly becoming redundant and in any case mughals had become a settled community and lost their proficiency at it.From the end of aurangzeb's time mughal armies could no longer win significant battles against the maratha light cavalry.
By aurangzeb's time mughals also no longer had monopoly on gunpowder weapons.Portugese and dutch traders supplied firearms to anyone with money and trained the gunners too.This meant regional forces now had access to matchlock muskets and even cannons,this made it much more difficult for mughals to impose and maintain central control.The proliferation of firearms into the indian countryside reduced mughal technological superiority.
Finally mughal manpower was affected by - jagirdari crisis side effect as noted earlier,loss of revenue due to large prosperous areas in revolt,regional subadars slowly breaking away after aurangzebs death,loss of rajput manpower to aurangzeb's policy and finally massive losses in the 27 yr deccan campaign against marathas.
3rd structural factor is the weakness inherent in the timurid monarchical tradition.Unlike in european monarchies where law of primoginature was paramount,legitimized by the church and succession was smooth,in islamic sultanates like mughal and even ottoman there was no clear succession law.This led to series of succession wars and mass instability.Jahangir revolted against his father and was pardoned,shahjahan revolted against him and nur jahan,aurangzeb kille dhis brothers and imprisoned shahjahan,aurangzeb's one son revolted and died in exile ,the other was imprisoned for suspected conspiracy.His son's fought it out and one lived.There were 2 further wars in the same decade(1710-1720) with factions constantly changing sides.The instability allowed the sbedars in frontier areas to consolidate their power and eventually become nominally all but independent.For example in return for their support to a candidate an ambitious subadar would want both the military and revenue collection powers of a subah to be allowed to be concentrated in his person.This removed the primary check on his power,the main seperation of power between finance and military responsibility that kept regional subadars in check and under control.Now these subadars while proclaiming nominal loyalty to delhi would make arrangements with local muslim elites,hindu zamindars and bankers and create a new regional elite.This is how the nawabi of awadh and bengal were formed.Hyderabad was similar but with more violence involved.
Now to historical actors,aurangzeb is primarily responsible.As well as the succession of weak luxury loving fools that followed him.
Aurangzeb's primary problem was a lack of balance despite being brave and incorruptible himself.He didn't have the balance between iron fist and velvet glove that akbar displayed.A list of his mistakes are enough.
He became increasingly puritan and rigid as he aged.While he was flexible earlier in his reign ,his intolerance increased in his later years.Taxes,impositions,destructions basically ended the 'feel good' sul i kul(peace for all) idea that akbar had tried to propagate for internal stability.
He brutally killed the sikh guru and his sons,and thus transformed what was a largely peaceful religious reform movement asking for autonomy into an all out military community at war with the mughal state.Guru govind singh transformed the sikhs into an armed militia with the formation of the khalsa in this time.
His foolish interference in internal affairs of rajput states led to breakdown of rajput alliance and loss of the military manpower and bureaucratic officials they provided.When the king of marwar who was a highest rank mughal general died with no heir.Aurangzeb annexed marwar on this pretext to be turned into a jagir.Now the queen gave birth to the late king's son soon,but aurangzeb refused to recognize him and sent his own man to rule.He willed that he would only recognize the boy if he should raise him and he convert to islam.This led to war with marwar led by durgadas rathore with mewar supporting him.Thus of the 3 main rajput states mewar and marwar were lost to the mughals and akbars rajput policy broke down.Aurangzeb should have remembered it was the rathore cavalry that had sacrificed itself against the uzbeks in the central asian campaign where he failed, to save the retreating mughal army.It was also a rajput general jai singh who had been the only mughal commander able to check shivaji,his own father in law shaista khan fled back to delhi minus his fingers and his army.So the rajput allince was gone and akbar's work undone.
Finally aurangzeb's greatest mistake was his deccan campaign.He made 3 main mistakes in the deccan.
First he underestimated shivaji as a petty chief and didn't reconcile with him when he was at agra .
Second,he destroyed the deccan sultanates because he believed they were secretly backing shivaji and because he hated them as shias.This suddenly extended the empire far to the south creating administrative overextension , removed all local checks from the marathas.He also made the mistake of integrating the deccan elites from the now defunct sultantes into his administration increasing number of jagirdars.But instead of distributing most of the new lands as jagirs he declared bulk of it as khalisa lands(royal lands) with revenue to be used for conduct of deccan campaign.He thus worsened jagirdari problem.
Third he brutally killed shivaji's successor shambaji by torture and mutilation after capturing him with treachery.He thought this would scare the marathas into submission,if he cut off the head the body would die.Instead the body grew several heads like a hydra and ignited a people's war.The brutality of the execution basically ensured it would be endless war with no chance of a settlement.He spent 27 years in the deccan trying to defeat the marathas.But ultimately failed and died there in 1707.In just last 10 years the campaign cost over a million mughal casualities(many to famine and disease) and bankrupted what was the richest state in the contemporary world.Basically the financial and military backbone of the mughal state was broken in the deccan and never truly recovered.The demoralized nobility began to make backdoor deals with maratha raiders to save their own estates/armies.The myth of mughal invincibility was also shattered.Within 10 years of his death,the sayyid brothers were putting emperors on the throne of delhi backed by maratha military support.
The other historical actors in the story of the fall of the mughals are ofcourse the rise of the marathas,who serve as the primary antagonist from the mughal point of view.Just as mughal leadership declined dramatically,marathas
in this historical time period were a force on the rise.They had a succession of very capable leaders shivaji, shambhaji, tarabai,balaji vishwanath,bajirao and mahadji scindia.By 1737 they had reached delhi and by 1772 permanently occupied it(despite panipat in 1761),only to be dislodged by the british in 1805.They developed an army and tactics far more cunning and unscrupulous than the rajputs mughals had encountered in north india and were unable to cope with it.
Combined with the other structural factors these cumulatively brought down the mughal empire.Ultimately all empires rise and fall,its a cycle of history.