The most important reason that President Lincoln did not want Maryland to secede from the Union had to do with the location of Washington, D.C. Maryland lies to the north of Washington. This meant that, if Maryland were to secede, the capitol of the United States would have been cut off from any contact with the US and would surely have fallen to the Confederates. This would have been a humiliating thing that would have helped the Confederacy immeasurably.
Of course, Maryland was also important just because of the fact that it had a relatively large population and would have added to the manpower and industrial capacity of the Confederacy. However, the most important reason why Maryland, in particular, was important was its geographical location.
Lincoln wanted to keep Maryland out of the Confederacy's hands because it surrounded Washington D.C. If Maryland fell, Washington D.C. would capitulate also and the Confederacy would be able to dictate their own terms. Maryland also had lots of farmland in order to feed the Army of the Potomac and Washington D.C. was a major rail terminus or it was at least close to many of the Eastern rail terminals. Also, Maryland was a slave state--by keeping this valuable slave state in the Union, it would serve as a positive example for other slave states such as Missouri and Kentucky that they should stay in the Union as well. Lincoln went to great pains in order to keep Maryland from seceding, going as far as instituting martial law in the state twice during the war and arresting the pro-Southern mayor of Baltimore in 1861.