These two documents were created for very much the same reasons. To some degree, their target audiences were different, but their basic goals were very much the same. Both of these documents were drafted mainly to gain support for the idea of American independence.
In January of 1776, it was not at all clear that there would be enough support for the cause of American independence. Battles had been fought in New England, but the war had not spread to a great degree. Many colonists were less than enthusiastic about the idea of fighting for independence. It was at this point that Paine wrote Common Sense. Its goal was to persuade colonists that they should take the side of independence.
By July of 1776, it had become clear that no compromise could be reached between the Americans and the British government. Therefore, the Continental Congress decided to declare independence. However, they needed support both from colonists and from foreigners. This was why the Declaration was written. It was meant as a justification of this major step that the colonists were taking. It was meant to explain to the world why it was right for them to rebel. If it were successful, it would bring more colonists onto the side of independence and it might persuade foreign countries to support the colonists against England.
Thus, both of these documents were drafted in order to gain support for the American cause in the rebellion against Britain.