Why can't we easily see stars and planets in the sky when we are in a city, but can see them clearly from elsewhere?
Because of the polluted air in the cities
Due to pollution, there are many particles in the air which absorb the light coming from the distant stars and planets. That is why stars visible in the cities are less in number, very faint and difficult to see.