Animal, plant and fungi are eukaryotes while bacteria are prokaryotes. There are lots of differences between eukaryotic and prokaryotic cells in terms of structures and functions. Their similarities are the cell membrane which is present in eukaryotes and in prokaryotes (not all prokaryotes have cell membrane) but they have different structures and functions. Both cells have ribosomes but smaller in prokaryotes. Both have genetic component: Eukaryotes have linear DNA, prokaryotes have circular. Both have vesicles, vacuoles and can be both motile.
They are important to each other because they are part of the ecosystem. Each one of them needs each other to survive, reproduce and to transfer energy. One of the most used tools in expressing their importance to each other is the food web which is a series of food chain happening in ecosystems.