Why do cells vary in shape and function when they have the same genome and the same organelles. For example: why do all cells have nuclei but red blood cell's don't; why can't the cells of a eye perform the function of the tongue; and the list goes on and on. If you say it is because of gene regulation, so then how does the RNA know to transcribe the specific genes that are necessary to that particular cell?
Because cells are not only characterized by by their genetic material and other interior components, but also by the genes they express. Cells have to fulfill multiple different functions to be able to build complex multicellular organisms. Differently expressed genes lead to different proteins made in the cell, which leads to different morphology, shape or function. For example melanocytes in the skin are highly specialized cells which mostly make the pigment melanin. Plasma cells on the other are highly specialised for making antibodies.
It is all about regulation of genes. The RNA doesn't know or transcribe anything - the DNA is trancribed into the mRNA (which is then further processed) and finally translated into proteins. Cells develop from precursors which proliferate and finally differentiate into highly specific cells. This progress is controlled and activated by specific transcription factors and growth factors. For example: pigment cells only develop, when a specific transcription factor is present. When this factor cannot be expressed, these cells do not develop at all.
This developmental process is shown schematically in the figure below (the figure is from the NIH website on stem cells):
The easy answer is: Each cell is living in its own environment and getting different signals that they act on. (Environmental cue --> Cell signal --> Cell turns on or off different genes based on these signals)
Recognizing that all cells have the same DNA is a good place to start. Imagine a single celled zygote formed from the union of one sperm and one egg...Early on, each of cell is capable of reacting in the same way to the same signals. And as the early embryo's cells begin proliferating, but before it implants in the womb, each cell is pretty much the same. And each cell has the possibility of becoming any of the myriad of cell types in the body. In fact, you can even split these early embryos apart and generate twins - two bodies (or more) instead of one.
However, soon, the embryo comes to rest against the wall of the womb and implant there. From this point on, not every cell gets the same signals. One cell is resting against the wall of the womb, another is several cell-widths away from the wall. A bit of randomness acts as the start of differentiation. The two cells start reacting to the signals in their slightly different environment and progress towards different fates. As development proceeds, these small differences become more pronounced and cells begin to commit to distinct lineages. No longer are they 'pluripotent' and able to become any given cell. The possibilities are more restricted as the environment of each cell gets more and more different. Cells 'commit' to their decisions and can't go back.
One good book you can pick up that will walk you through this idea is Neil Shubin's 'Your Inner Fish.' The overall story is about evolution of the first land quadrapeds, but he pursues a lot of different lines of evidence, and several of them involve molecular biology and cell differentiation.
Despite of the fact that all cells have the same genome, not all the genes contained in the cell nuclei are functional. During embryonic development, cells are subjected constantly to division and differentiation processes; this means that in the earliest stages of embryonic development, each cell of the embryo can form, by itself, a new complete body. However, these cells loose their ability of "all-forming" as the embryonic development progresses and they become able to form only certain group of tissues. Lately, they would be only able to form just one type of tissue.
All these cells have, obviously, the same genes, but what makes a cell of early stages of embryo development (stem cell) different from another of the body if they have the same genes? The answer is that although they have identical genes, differentiated cells use less genes than a stem cells would use. For this reason, only a certain number of genes of the total that a differentiated cell contains, are in use. A neuron, for example, wouldn't need a gene that produces hair protein because simply, its function isn't that, so neurons inactivate the gene of hair-producing.
There is much more to investigate and to research in this field because many questions still remain without answer such as how cells acquire certain shapes and not other or how do they form perfect 3D organized shapes (tissues and organs) and much more question in this way.