As we know that universe is expanding, why can't we think the gravitational force as repulsive in nature in the realms of dark matter and dark energy?
2 Answers
The gravity of dark energy is repulsive (but not because it has negative mass or negative energy density). However, the gravity of dark matter is boringly attractive.
The difference between dark matter and ordinary matter is not in their gravity but in their electromagnetic interactions: dark matter doesn’t have any, so it doesn’t emit or absorb light or other electromagnetic radiation.
You don’t need repulsive dark energy to explain why the universe is expanding. After all, a ball can move upward for awhile even though Earth’s gravity isn’t repulsive. You need dark energy to make the universe expand faster and faster, rather than slower and slower.
Dark matter is gravitationally ordinary, as G. Smith says, and attracts.
Dark energy can be understood as a combination of energy-density and tension, somewhat as a stretched elastic band has tension. According to general relativity, energy-density always attracts gravitationally, and the presence of tension always counteracts this. The tension in ordinary objects such as elastic bands is much too small for its gravitational effect to be noticed, but the tension in dark energy is comparable to its energy density. The tension does not pull things together because it is equal on the opposite sides of any given region and so as a force in its own right it cancels out. However the contribution to gravity associated with it does not cancel out, and is always repulsive. The gravitationally repulsive effect of this tension then dominates the attractive contribution from energy density.
The point pertinent to your question is that gravity acts in the same way on dark energy as it does on other things, but dark energy has this unusually high tension, with the result that the net gravitation is repulsive in this case.