The word "holy" has taken quite a semantic beating through such sayings as being stuck up ("holier than thou") and pedantic usage in popular culture ("Holy Socks, Batman!"). Popularly we may suppose that "holy" means "morally good".
This is only part of the meaning, however. Holiness implies goodness, but goodness is an interactive part of holiness. If we may sum up the core meaning of holiness, it is not "good" but rather "set apart" -- and therefore, good.
The concept of holiness may be related to the concept of purity, which we have previously studied here: . In ancient societies, purity codes "are a way of talking about what is proper for a certain place and a certain time" and involve "drawing the lines that give definition to the world around us...".
Holiness is itself a drawing of a boundary, around that which is uniquely associated with God. In God's Holy People: A Theme in Biblical Theology (Sheffield Academic Press, 2000), Jo Bailey Wells surveys the meaning of "holiness" throughout the Bible and reaches these conclusions, to which we add certain implications:
- Holiness means uniqueness. In the OT holiness meant that Israel was associated with God. This set them apart from the other nations, for His "presence resides with and is invested in Israel." Today, this is matched with the residence of the Holy Spirit in the person of the believer, and is seen in Paul's description of the believer's body as a temple of the Holy Spirit.
Practically, this also relates to the detailed instructions given for the cultic apparatus of Israel (the Ark of the Covenant, the altars, etc.) which modern critics (and even some Christians) fail to appreciate. That which is unique requires unique accommodation i.e., that which is set apart from other treatment. Our bodies should be treated like temples, not subjected to the vagaries of bad habits. Likewise, the Ark was needed and not just any old cardboard box.
- Holiness means belonging to God. Holiness is a two-way street. We are, as Israel was, dependent on God, and in NT times this was expressed to mean that God was our patron in a client-patron relationship.
In OT times it meant that God signed a contract (Deuteronomy) with the people agreeing to protect them. The terms now are eternal and soteriological, but the principle of a dependent relationship remains the same.
- Holiness means living with God. Down the other way of the two-way street, holiness means living for God and living in obedience to him. In the NT period we would say that God has made this obedience easier by the indwelling of the Spirit, and that such obedience also naturally follows from our belief that God has acted through Christ. In the OT, Israel "has a common purpose in its relationship with Yahweh" and is "united in its priorities to obey God fully and to keep his covenant". 
- Holiness means being a light. Finally, because Israel was invested with God's presence, "then it may represent it and mediate it to others."  Hence, Israel as a "light to the nations" and hence the NT call to missions.
Thus, we see that "holiness" implies a setting apart for God's purpose. Moral goodness is intrinsic to the meaning only inasmuch as (obviously) only with such goodness can one serve God's purposes. The holy person in the Bible is one who has had a line of definition drawn around them consecrating themselves, and all they are and do, to the purposes of God. How that works out within one's personal life today is a matter of individual conscience.