(a) Cast products have greater flexibility in design of geometry so they can take up less volume, hence lighter. For example investment casting can create intricate internal features, weight-saving regions, and even interconnected internal macroscopic voids, that are simply not possible to create with machining processes that are driven from the outside.
(b) Cast products may be foamed, as part of the casting process. This is established technology for plastic injection molding, and involves a blowing agent. Cast metal foams also exist, some also using a blowing agent (there are other production methods too), though this is still an area under development.
(c) Some cast products suffer from porosity. For example cast aluminium can have a tendency to form internal hydrogen bubbles (which can be visible to the naked eye), and consequent hydrogen embrittlement. This is usually considered a quality defect, rather than a design feature. The location at which the porosity is most likely to appear can be predicted by casting simulation software, so I suppose someone will eventually use that in a deliberate way!
(d) Differences in density of crystalline microstructure between cast and wrought products are not usually significant at the macroscopic level. Having said that, different material grades (i.e. composition) are often used for cast vs. wrought materials, so you are not always comparing things that are exactly the same.
From my perspective, the grain structure of the casting products and machining products decides whether it's light/heavy. Generally, the grain boundary gets compacted my multiple machining process compared to casting process.
This has nothing to do with porosity or grain structure and has everything to do with the design of the part. If the part is quite complex, there may be sections that can be cast with areas removed for weight savings which is not manufacturable with a machining process. Complex parts are good candidates to be produced by casting. If the part is not that complex, casting does not provide any weight/cost savings.
The manufacturing decision w.r.t. to complexity is accepted. But, I'm not sure that I've understood the question clearly, I think it's about the comparison of the weighing factor between the machining and casting for a (same) product. Here, the compactness of the grain structure comes into picture due to the tribological effect between the two processes.
(a) Cast products have greater flexibility in design of geometry so they can take up less volume, hence lighter. For example investment casting can create intricate internal features, weight-saving regions, and even interconnected internal macroscopic voids, that are simply not possible to create with machining processes that are driven from the outside.
(b) Cast products may be foamed, as part of the casting process. This is established technology for plastic injection molding, and involves a blowing agent. Cast metal foams also exist, some also using a blowing agent (there are other production methods too), though this is still an area under development.
(c) Some cast products suffer from porosity. For example cast aluminium can have a tendency to form internal hydrogen bubbles (which can be visible to the naked eye), and consequent hydrogen embrittlement. This is usually considered a quality defect, rather than a design feature. The location at which the porosity is most likely to appear can be predicted by casting simulation software, so I suppose someone will eventually use that in a deliberate way!
(d) Differences in density of crystalline microstructure between cast and wrought products are not usually significant at the macroscopic level. Having said that, different material grades (i.e. composition) are often used for cast vs. wrought materials, so you are not always comparing things that are exactly the same.
If you are asking about two parts that are EXACTLY the same (alloy, cross-section, etc.), other than one being cast and the other machined from wrought stock, the difference is most likely from entrained porosity in the casting. There is no appreciable difference in density between a fully dense casting and a wrought version of the same alloy.
However, if you are talking about a component optimized through the casting process versus machined, Dirk Pons has covered the reason quite well in his response.
The question needs to be properly explained with reference to the part geometry and material. As explained by Robert Hafley and Dirk Pons Casting provides flexibility to distribute material more uniformly depending upon the nature of external force acting on the part. As a result, it would be possible to remove the unwanted material from the part geometry where it is not required by coring. Similarly add strengthening geometries such as ribs where required. Thus theoretically it would be possible to get any complex geometry with low weight. In machining because of the limitation of the machining methods some of the complex geometries are not possible. But porosity is not the reason for low weight. If porosity is present, then the strength will be reduced.
I think a major problem of this thread is that the original question is not formulated clearly - it can be understood in at least two different ways:
(a) Two part with identical geometry are compared, one produced by casting. Both parts are weighed. The cast part turns out to be lighter. If that's what is meant, explanations in the direction of internal porosity would apply.
(b) A component has to be designed respecting certain requirements (e.g. withstanding some design load cases). Two design are proposed, one based on casting the component, the other based on machining it. Because they reflect the boundary conditions of the production process, both parts differ in geometry, but both fulfill the requirements. The design based on casting turns out to be lighter. In this case, explanations in the direction of more flexibility of distributing material in casting processes (though for sure there are limitations here, too) would apply.
This distinction I think is the main issue that needs to be clarified by Vishal Vasistha before the question can be answered in the way he meant it.
... and even then, there are additional points that need to be considered - one is the point of actual materials already touched upon by Nageswara Posinasetti:
Casting alloys and wrought alloys (which you would probably have in a machined part) usually differ in composition. This applies for iron/steel, aluminum, magnesium, ... so are the components compared made of the same alloy at all?
Different alloys e.g. mean different density (additional approach for an explanation in the case of (a) mainly), but also different strength levels (related to (b) case). Furthermore, strength can be increased via heat treatment. If you think for example of aluminum or magnesium, for which high pressure die casting is a common process, heat treatment may not be possible for a casting even if the alloy chosen is generally susceptible to such measures.