Do you have to believe in God to be a moral person?
It suffices one believes their own individual actions are meaningful. You don’t need to appeal to anything other than that. In the context of Christianity (and every other major religion except Buddhism), there exists this assumption one has to be religious to first be moral; and there are plenty of historical examples of secular-minded leaders and thinkers who have accepted this premise: in his Farewell Address, George Washington argued it wasn’t possible for a people to possess a direction if it didn’t first possess a religious anchor. Abraham Lincoln appealed to Providence (a synonym really for God) to demonstrate slavery’s evil. I would argue, though, that there’s no real need to appeal to Providence to demonstrate slavery is wrong: all I need to do is ask the slave a simple question like “Do you want to be a slave?” And if they respond by saying “no” the rightness or wrongness is concrete–in the here and now–well established. No need to appeal to Providence (when in fact Providence was used in the 19th century to justify the continuation of slavery, e.g. See the biblically based and dubious justification called “Curse of Ham“).
In reality, God for the theist acts fundamentally as an anchor or a concrete starting point (providing an internal sense of contrast of what constitutes right behavior from wrong). Human beings crave certainty and if it can be demonstrated concretely that God wants us to do either this or that action then a certain clarity is brought to existence. Yet, if all we need is an anchor, agnostics and atheists and everyone in-between all possess them; they may not all appeal to divine beings, or external measures, as that anchor but the anchors nonetheless exist in mind and motivation. Interestingly, the Lutheran pastor and theologian Dietrich Bonhoeffer (1906-1945) argued in his Letters and Papers from Prison that boiling down God, or morality, as immovable anchors or standards was simply no longer an option: in the infancy of humankind we could appeal to the wisdom of following rules; however, in the 20th century, when Bonhoeffer was writing, with all of our advances in both scientific and theological scholarship, we had to grow up and start taking more personal responsibility for living in the world (pages 478-480).
All theists, agnostics, and atheists, believe that what they do and believe is meaningful; the only true difference that exists between these three categories of moralists is the agnostic stresses intellectual integrity and consistency while accepting certain questions are by their very nature unanswerable; atheists abandon any external justifications (other than collective experience and logic) for their actions instead choosing to take personal responsibility for them. For atheists and agnostics, in particular, meaningful action (and by extension morality) comes from a simple act of faith (so to speak) that what they do matters in the here and now (and not “necessarily” in a life that is to come).