There are two reasons why we should not have a sexual/marital relationship with a close relative. The scientific reason is the threat of congenital defects in the offspring, and is often enforced by civil law. The biblical reason has more to do with the health of the extended family. While laws usually do not address this aspect, we should still consider the wisdom of considering the bigger picture.
What does the Bible say about having a marital/sexual relationship with a close relative?
When God made Adam and Eve in the Garden of Eden, they were genetically perfect. They had no congenital defects, no diseases lurking in their DNA. Such issues came into the human race gradually, over the course of several thousand years. It's possible that the environmental changes after the Flood had a part in accelerating cell damage; perhaps people were exposed to more cosmic and solar radiation as the drastic decrease in ages after the Flood suggests. Adam and Eve's children married their full-siblings. Two thousand years later, Abraham was Sarah's half-brother. There were many marriages between cousins in the Old Testament, including those of Isaac, Esau, and Jacob. In fact, marriage between first cousins is still allowed in some states in the U.S. And a study in the Journal of Genetic Counseling in 2002 showed that children of first-cousins have only about a 2-3% higher risk of birth defects than normal—a number comparable to the defects in a child born of a 41-year-old woman as opposed to 30 years of age.
Over the course of history, societies have progressively banned marriages and sexual relations between descendants (father/daughter; grandmother/grandson; etc.) and siblings because of genetic issues with more direct inbreeding. The bans were made easier to accommodate with the invention of the bicycle and then the car—suitors were able to go farther distances to find potential mates. These taboos tend to be enforced by law. (It could be argued that Genesis 2:24 indicates that marriage between children and parents was never allowed by God).
Although science gives a powerful motivation to avoid marriage among close relations, the Bible's laws on incest do not address genetic anomalies or congenital defects. The laws in Leviticus 18 suggest another motivation. These are the relationships God forbade to intermarry:
Mother/stepmother and son (vs. 7-8)
Sister/half-sister and brother (vs. 9, 11)
Grandchild and grandparent (vs. 10)
Aunt and nephew (vs. 12)
Uncle and niece (vs. 14)
Daughter-in-law and father-in-law (vs. 15)
Sister-in-law and brother-in-law (vs. 16)
A woman and her daughter and the same man (vs. 17)
A woman and her granddaughter and the same man (vs. 17)
A woman and her sister and the same man (vs. 18)
The reasons for the restrictions seem to be relational, not health-based. It was disrespectful to "uncover the nakedness" of one's parent or child, to include having sex with those relations' spouses. To have sex with a step-mother, aunt, daughter-in-law, or sibling was to upset the delicate balance of relationships in the family. It was dishonoring to the participants and their spouses. The two exceptions were if a man's wife died, he could marry her sister (vs. 18), and if a man died childless, his brother was expected to marry the widow and provide an heir. In either case, relational rivalry wouldn't be an issue.
The decision to marry a close relative, then, becomes a matter of three different factors. Is it legal? Different states and countries have different laws regarding marriage between relatives. Does it endanger the health of the children? Some states require marriages between first cousins to be sterile. Would the relationship be disrespectful to anyone involved to the point that it affects the peace of the extended family? If those issues are clear, there is nothing biblical against marriage between close relatives, and it becomes a matter of prayer and wisdom.