Sadly, but not surprisingly, the answer to this is that we simply do not know for sure. There is a story about why Constantine converted, but there is no real way to know if it is true.
The story goes that God sent a vision to Constantine that promised him military victory if only he would convert and become a Christian. In the year 312, Constantine was involved in a civil war within Rome over who would be emperor. A Christian historian claims that Constantine had a vision before an important battle in which he saw the cross with the words "conquer by this" or "by this sign, conquer" on it. He interpreted this as a message that he should become Christian, or at least make Christianity legal.
This account is not necessarily true, however. As the eNotes link below tells us,
Eusebius claims that he heard the story from the lips of Constantine, but he wrote after the emperor’s death and he does not tell the same tale in his Historia ecclesiastica (c. 300, 324 c.e.; Ecclesiastical History, 1576-1577, better known as Eusebius’s Church History).
But this is the story that is told and we have no other records that would tell us why Constantine converted.
During Constantine's life, the Roman Empire had finally begun its log slide into disunion. Various generals sought out the emperorship; their infighting was both cause and result of the general political decline. Politics and Religion were not separate forces in ancient times; the power of the State depended upon the will of the gods, or so was the common belief. Whatever gods one professed would have suggested political profession as well. Constantine, using the sign of the Cross upon his banners during the Battle of Milvian Bridge in 312, was attempting to unify Rome, but as the outside political force, he aligned himself with the outside religious belief, in contrast to the status quo Roman gods and politics. Having won the battle, he became the sole leader in the Western empire. Perhaps this was the first use of Christian belief as a unifying force. By 324, Constantine had unified both Eastern and Western parts of the Empire. Perhaps he never accepted Christianity, but used it as a political tool for reuniting the empire.