Is it possible to grow any kind of fruit or vegetable in coffee ground (instead of normal soil) so that they get coffee flavor? If yes, which fruit or vegetable works best and what do I have to consider when doing this?
Adding coffee grounds to a planting medium (e.g. soil) adds fatty acids, essential oils and nutrients that enrich soil which can help the growth of the plant and it may also affect the colour. One thing to be careful of is that some coffee grounds increase the acidity of the soil. However, I can't find anything indicating that it will affect the flavour of the plant. So, by all means, grow your plants in coffee grounds, but don't expect any difference in flavour.
Although the way plants digest food is very different to humans, the overall principle is the same: nutrients go in, and are completely broken down into very basic building blocks (amino acids, simple fats and sugars), and then rebuilt into whatever the organism needs.
This is why we can eat plants, which are made of plant protein, and reassemble them into animal protein in our bodies, and vice versa.
While used coffee grounds will be a good source of the nutrients a plant needs to produce essentially more of the same stuff, it won't have any direct affect on the flavour (any more than any other good source of nutrients).
There is a culinary notion of terroir adopted from the wine terminology which asserts that the specific characteristics of a environment and the stuff of the earth -- the substance -- does contribute greatly to agriculture. But it may take a good deal of investigation to discover which specific types of plants will really thrive.
Call it the Homegrown Tomatoes effect, but it may enrich the flavor merely by the psychological effect of telling your
victimsguests about the marvelous results you've achieved. They'll instinctively look for the coffee taste that you tell them might be in there.