If say, one is deported from a given country A. Is it possible for country B to deny that person visa in future on grounds of that deportation?
I would think it depends on the reason why one has been deported, and the relationship between country A and country B.
To take an extreme example, if one had been deported from a 'five eyes' nation following a conviction and prison sentence for a terrorism offence, it seems likely that the other 'five eyes' nations would look askance at admitting one into their country.
On the other hand, if one had been deported from Russia for promoting equality for homosexual people, or deported from Iran for spying for a Western power, it seems unlikely that would be a bar to admittance to the USA.
If what you're really asking is whether there's some kind of law that stops an immigration officer from taking into account information which originates from another country, then I guess this will vary around the world. If you're asking whether countries tell each other about deportations, then this will depend on the two countries involved, but some countries certainly do share security information with one another, and this probably does include the details of people who are deemed undesirable or dangerous to admit into the country.
Whether they share info on minor immigration offences is likely to depend on the countries in question.