The function of an onion cell is to organize the biological processes of an onion. The onion, like other complex organisms, has different cells. There are cells that make up its leaves and flowers, cells that make up the onion bulb and cells that make up its roots.
The type of onion cell in the plant is determined by the proteins the cell produces. As in most living things, the onion's DNA creates the blueprint for all the proteins the plant produces.
As a plant cell, the onion cell is different from the cell of an animal. For one thing, it has a cell wall that surrounds the cell membrane, which an animal cell lacks. At least some kinds of onion cells have chloroplasts, which is where photosynthesis takes place. Photosynthesis creates fuel for the plant.
An onion cell also has mitochondria, which are the power plants for the cell. Onion cells also have nuclei, which contains proteins, DNA and nucleoli. There are also Golgi bodies, which are flat bodies that prepare carbohydrates and proteins to be exported out of the cell. There are large, watery spaces called vacuoles and ribosomes. Ribosomes contain RNA, which copy the blueprints of proteins made by the DNA. Everything floats in a jelly-like substance called cytoplasm.