They are utterly different constructions; but in many contexts (but not all) they have nearly the same meaning, and can be used interchangeably.
"A family's needs" (you need the article there, because "family" is a full NP (noun phrase), and a singular countable noun needs an article) is referring to the needs of a family (a particular family, or a family in general). "The family's needs", and "families' needs" are variants with meanings deducible from the meaning of "the family" and "families".
"Family needs" is a different construction where the NP "needs" is modified by another noun "family" (when used a modifier in this way, a noun usually does not require an article, and doesn't usually take a plural form either, even when the meaning is arguably plural). This means that the kinds of needs being referred to are family-kind-of needs. This doesn't specify the precise relationship to a family, and so one of its possible meanings is essentially the same as "a family's needs". But it could in principleexpress another kind of relationship. For example, I can imagine talking about an individual's "family needs", meaning what kind of family environment that person needs: that would not be expressible as "family's needs".
Note that there is also an element of idiom involved in such expressions. We talk about "girl's toy" rather than "girl toy", and there is no particular explanation for this.