Regarding the generic aspect of your question, Ductility and Brittleness of materials are just on set of properties that need to be satisfied by the design requirements. There may be other design requirements that need to be satisfied, e.g. for a window material transparency is a design requirement which can not be met by ductile steels, but maybe met by glass which is brittle. Another example is heat resistance, which is common to ceramics (which are usually very brittle) and perform better than most steels. So in some cases the design requirements play a role.
Regarding the specific example of cast iron in engine blocks, the main problem is that the complexity of the design engine block does not lend itself to machining processes with removal of material. Its much more economic and faster (and some time possible) to use casting as a process, with the inherent problems on the brittleness.
Additionally, the reason why the brittleness is not an issue is that an engine block operates needs to operate in a very small range of stresses because it has very tight dimensional tolerances. I.e. if the stresses increased the cylinder's would deform and the machine would not operate as efficiently (leakage of pressure would lead to reduced pressure etc). So, an engine block is over engineered (i.e. much thicker walls) so that the stresses are always in the lower elastic range. So, at the end of the day there would not be a significant benefit from using a more ductile material (because the engine cannot operate there).
Regarding the final part of your question
Another term that is confusing me is hardness. How hardness is related to brittleness. If a material is strong and hard, will it be brittle?
Strength and hardness correlate (e.g. for steels there are charts that estimate the strength of a steel given the hardness number) e.g.

However ductility is another property which does not correlate well with the other two. (For more details, I guess you should clarify or --even better- post another question , because there is not enough info on what exactly is it that you are asking.)