First of all, let’s get a term straight:
Discrimination is simply the act of distiguishing one thing from another according to its characteristics (verb transitive: discriminate). Thus, when a is treated differently from someone else according to some characteristic that differs between the people in question, that is ‘discrimination’.
It is only in the context of the phrase “discriminate against” that the present, ‘bad’ meaning of discrimination occurs. When a person with black skin is treated differently from a person of white skin, in a way that the black person perceives as worse, then he has suffered ‘discrimination’ (in its more modern meaning). But ANYONE who is treated differently at any time because of who or what they are, or because of some characteristic they have that others don’t, has been the subject of ‘discrimination’.
Thus, a person under the age of 25 who is subject to different rates of insurance than a person over the age of 25 has suffered discrimination. If those rates were higher, he has been discriminated against; if lower, he has been discriminated in favor of (yeah, I know, lousy grammar, but this is the sort of nonsense up with which…).
Now for the legal issue.
You can discriminate legally most of the time. Indeed, there are very FEW ways in which discrimination is not allowed under the law.
Arguably, to protect people from being discriminated against for improper reasons, the 14th Amendment states that:
Now, obviously we can’t always treat every person the same as every other person. Who wants to let a 10-year old drive? Who wants to let untrained people operate in a surgery? Who wants women in men’s dressing rooms… oh, wait, stike that one.
So the equal protection clause doesn’t bar discrimination of any kind; it bars discrimination that we determine (through our appointed representatives, the judges of the various courts, including the USSC) is impermissible.
How do the Supremes decide what discrimination is impermissible? A good question, one that the damn Court wrestles with unsuccessfully at times. 
Ignoring for a moment the folly of Plessy v. Ferguson and all those years of ‘seperate but equal’, the USSC has two (or arguably three) rationales it uses to decide if discrimination by government is impermissible. First, it looks at the characteristic being used to make the division of groups (e.g., race). If the characteristic in question creates a class that it deems is ‘suspect’, or divides people according to their ability or desire to exercise a fundamental right, then the law receives ‘strict scrutiny’. In such cases, the government must show a ‘compelling’ or ‘overriding’ need to use the method of classifying people. Further, the Court will independently analyze the classification to see if it is necessary to meet that need. Needless to say, when the classification results in discrimination against a minority race, almost nothing is found to meet this test.
When the classification doesn’t result in the creation of a ‘suspect’ class or seperate users of a fundamental right, then the Court applies the ‘rational relationship’ test. Basically, the Court will accept any reasonable rational relationship between the classification and a permissible societal concern. In this way, the Court avoids second-guessing the legislatures about general economic issues, for instance.
In the middle, there is a third test that rarely is actually named as such; usually it gets cloaked under one of the other two tests. In this middle ground, classifications that are less ‘suspect’ or which touch on less fundamental rights will be allowed if they are substantially related to an important governmental objective. The first such classification to be so reviewed was classification by sex (Craig v. Boren, 429 U.S. 190,197 (1976)). The trouble with this analysis is that it seems to hark back to the nasty days of ‘substantive due process’ where the USSC used its own opinions about societal needs to strike down legislation rather than deferring to legislatures, or using any easy to understand test to determine the line beyond which a government may not go.
Under this two or three-part scheme, the following classification schemes have been placed:
Subject to strict scrutiny: race, alienage, national origin
Subject to middle-level scrutiny: gender, illegitimacy, sexual orientation.
Subject to lowest scrutiny: age, wealth (when it doesn’t involve the ability to exercise a fundamental right)
Thus, if the state establishes a mandatory retirement age, that classification will not be overturned unless it bears no rational relationship to a presumed legitimate interest.
As to private individuals, our conduct is governed not by the Constitution, but by the laws that the states and the federal government pass. Most states, as well as the federal government, have laws making it illegal to discriminate on the basis of various classifications. You can see the various threads in GD and GQ about the Boy Scouts of America and their right to exclude gay leaders for an example of application of such laws to individuals or groups of individuals. Whether a given group will be protected depends on the state in which the discrimination occurs. Sometimes, cities and counties have their own laws on the subject (in Santa Cruz, CA, for instance, a business is prohibited from discriminating on the bais of how a person looks; e.g., they can’t refuse to serve or hire people with unusual hair styles, or people who are obese, etc.). Santa Cruz still thinks of themselves circa 1970. 
So, to address this from a practical sense: Nothing in the US Constitution prevents an insurer from discriminating on the basis of race; the Constitution DOES prevent the state in which the insurer is licensed to do business from adopting legislation or taking administrative action that approves of such action (e.g., the state’s insurance commissioner couldn’t approve a rate schedule that discriminates on the basis of race). But in every state of the union, as well as by federal law (assuming the insurer meets some very broad categorical definitions), it would be against the law for the insurer to discriminate on the basis of race.
On the other hand, not only would the US Constitution permit the state to allow age-based discriminatory rate classifications, in most states such classifications would be legal as well. Somewhere in the middle between these two is gender-based discrimination.
Sorry for the long-winded answer, but, as usual with constitutional law, there isn’t some easy answer. 